| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/service/cloud_print/printer_job_queue_handler.h" | 5 #include "chrome/service/cloud_print/printer_job_queue_handler.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 | 12 |
| 13 namespace cloud_print { | 13 namespace cloud_print { |
| 14 | 14 |
| 15 class TimeProviderImpl : public PrinterJobQueueHandler::TimeProvider { | 15 class TimeProviderImpl : public PrinterJobQueueHandler::TimeProvider { |
| 16 public: | 16 public: |
| 17 virtual base::Time GetNow() override; | 17 base::Time GetNow() override; |
| 18 }; | 18 }; |
| 19 | 19 |
| 20 base::Time TimeProviderImpl::GetNow() { | 20 base::Time TimeProviderImpl::GetNow() { |
| 21 return base::Time::Now(); | 21 return base::Time::Now(); |
| 22 } | 22 } |
| 23 | 23 |
| 24 JobDetails::JobDetails() {} | 24 JobDetails::JobDetails() {} |
| 25 | 25 |
| 26 JobDetails::~JobDetails() {} | 26 JobDetails::~JobDetails() {} |
| 27 | 27 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 job_found.first->second.retries_ += 1; | 159 job_found.first->second.retries_ += 1; |
| 160 job_found.first->second.last_retry_ = time_provider_->GetNow(); | 160 job_found.first->second.last_retry_ = time_provider_->GetNow(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 return true; | 163 return true; |
| 164 } | 164 } |
| 165 | 165 |
| 166 } // namespace cloud_print | 166 } // namespace cloud_print |
| 167 | 167 |
| OLD | NEW |