| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/browser/push_messaging/background_budget_service.h" | 5 #include "chrome/browser/budget_service/background_budget_service.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 11 #include "base/metrics/histogram_macros.h" | 11 #include "base/metrics/histogram_macros.h" |
| 12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
| 13 #include "base/strings/string_split.h" | 13 #include "base/strings/string_split.h" |
| 14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
| 15 #include "base/time/clock.h" | 15 #include "base/time/clock.h" |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 | 173 |
| 174 base::Time time = clock_->Now(); | 174 base::Time time = clock_->Now(); |
| 175 SetBudgetDataInPrefs(profile_, origin, time.ToDoubleT(), budget, ses_score); | 175 SetBudgetDataInPrefs(profile_, origin, time.ToDoubleT(), budget, ses_score); |
| 176 } | 176 } |
| 177 | 177 |
| 178 // Override the default clock with the specified clock. Only used for testing. | 178 // Override the default clock with the specified clock. Only used for testing. |
| 179 void BackgroundBudgetService::SetClockForTesting( | 179 void BackgroundBudgetService::SetClockForTesting( |
| 180 std::unique_ptr<base::Clock> clock) { | 180 std::unique_ptr<base::Clock> clock) { |
| 181 clock_ = std::move(clock); | 181 clock_ = std::move(clock); |
| 182 } | 182 } |
| OLD | NEW |