| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/browser/extensions/activity_log/activity_log_policy.h" | 5 #include "chrome/browser/extensions/activity_log/activity_log_policy.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/json/json_string_value_serializer.h" | 13 #include "base/json/json_string_value_serializer.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/time/clock.h" | 16 #include "base/time/clock.h" |
| 17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 18 #include "chrome/browser/extensions/activity_log/activity_action_constants.h" | 18 #include "chrome/browser/extensions/activity_log/activity_action_constants.h" |
| 19 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
| 20 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
| 21 #include "extensions/common/extension.h" | 21 #include "extensions/common/extension.h" |
| 22 #include "url/gurl.h" | 22 #include "url/gurl.h" |
| 23 | 23 |
| 24 using content::BrowserThread; | |
| 25 | |
| 26 namespace constants = activity_log_constants; | 24 namespace constants = activity_log_constants; |
| 27 | 25 |
| 28 namespace extensions { | 26 namespace extensions { |
| 29 | 27 |
| 30 ActivityLogPolicy::ActivityLogPolicy(Profile* profile) {} | 28 ActivityLogPolicy::ActivityLogPolicy(Profile* profile) {} |
| 31 | 29 |
| 32 ActivityLogPolicy::~ActivityLogPolicy() {} | 30 ActivityLogPolicy::~ActivityLogPolicy() {} |
| 33 | 31 |
| 34 void ActivityLogPolicy::SetClockForTesting(std::unique_ptr<base::Clock> clock) { | 32 void ActivityLogPolicy::SetClockForTesting(std::unique_ptr<base::Clock> clock) { |
| 35 testing_clock_ = std::move(clock); | 33 testing_clock_ = std::move(clock); |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 *late_bound = base::Time::Max().ToInternalValue(); | 146 *late_bound = base::Time::Max().ToInternalValue(); |
| 149 } else { | 147 } else { |
| 150 base::Time early_time = Util::AddDays(morning_midnight, -days_ago); | 148 base::Time early_time = Util::AddDays(morning_midnight, -days_ago); |
| 151 base::Time late_time = Util::AddDays(early_time, 1); | 149 base::Time late_time = Util::AddDays(early_time, 1); |
| 152 *early_bound = early_time.ToInternalValue(); | 150 *early_bound = early_time.ToInternalValue(); |
| 153 *late_bound = late_time.ToInternalValue(); | 151 *late_bound = late_time.ToInternalValue(); |
| 154 } | 152 } |
| 155 } | 153 } |
| 156 | 154 |
| 157 } // namespace extensions | 155 } // namespace extensions |
| OLD | NEW |