message: Adds assert to ensure correct logic, adds using directive
  Relates-to:
diff: @@ -77,6 +77,7 @@ bool RequestTracker::Track(const ApplicationID& app_id,
  const uint32_t max_requests,
  ApplicationsRequestsTracker& tracker) {
  LOG4CXX_AUTO_TRACE(logger_);
  + using date_time::DateTime;
  if (!time_scale || !max_requests) {
  LOG4CXX_INFO(logger_, "Time scale request tracking is disabled.");
  @@ -92,7 +93,7 @@ bool RequestTracker::Track(const ApplicationID& app_id,
  if (tracker.end() == it_app) {
  LOG4CXX_DEBUG(logger_, "Adding new application into tracking.");
  - tracker[app_id].push_back(date_time::DateTime::getCurrentTime());
  + tracker[app_id].push_back(DateTime::getCurrentTime());
  return true;
  }
  @@ -101,25 +102,25 @@ bool RequestTracker::Track(const ApplicationID& app_id,
  if (it_app->second.size() < max_requests) {
  LOG4CXX_DEBUG(logger_, "Adding new request into tracking.");
  - tracker[app_id].push_back(date_time::DateTime::getCurrentTime());
  + tracker[app_id].push_back(DateTime::getCurrentTime());
  return true;
  }
  - LOG4CXX_DEBUG(
  - logger_,
  + LOG4CXX_DEBUG(logger_,
  "Oldest request is added at: "
  - << date_time::DateTime::getmSecs(it_app->second.front())
  - << ". Current time is: " << date_time::DateTime::getmSecs(
  - date_time::DateTime::getCurrentTime())
  + << DateTime::getmSecs(it_app->second.front())
  + << ". Current time is: "
  + << DateTime::getmSecs(DateTime::getCurrentTime())
  << ". Time scale is: " << time_scale);
  - if (date_time::DateTime::calculateTimeSpan(it_app->second.front()) >
  - time_scale) {
  + if (DateTime::calculateTimeSpan(it_app->second.front()) > time_scale) {
  LOG4CXX_DEBUG(logger_, "Dropping oldest request, adding new one.");
  ApplicationsRequestsTracker::mapped_type& times = tracker[app_id];
  + DCHECK_OR_RETURN(!times.empty(), false);
  +
  times.erase(times.begin());
  - times.push_back(date_time::DateTime::getCurrentTime());
  + times.push_back(DateTime::getCurrentTime());
  return true;
  }
  