OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/signin/cross_device_promo.h" | 5 #include "chrome/browser/signin/cross_device_promo.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
10 #include "base/prefs/pref_service.h" | |
11 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
12 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
13 #include "base/time/time.h" | 12 #include "base/time/time.h" |
14 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
| 14 #include "components/prefs/pref_service.h" |
15 #include "components/signin/core/browser/signin_client.h" | 15 #include "components/signin/core/browser/signin_client.h" |
16 #include "components/signin/core/browser/signin_manager.h" | 16 #include "components/signin/core/browser/signin_manager.h" |
17 #include "components/signin/core/browser/signin_metrics.h" | 17 #include "components/signin/core/browser/signin_metrics.h" |
18 #include "components/variations/variations_associated_data.h" | 18 #include "components/variations/variations_associated_data.h" |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 // Helper method to set a |local_parameter| to the result of fetching a | 22 // Helper method to set a |local_parameter| to the result of fetching a |
23 // |variation_parameter| from the variation seed, converting to an int, and then | 23 // |variation_parameter| from the variation seed, converting to an int, and then |
24 // applying |conversion| to create a TimeDelta. Returns false if the | 24 // applying |conversion| to create a TimeDelta. Returns false if the |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 device_activity_fetcher_->Start(); | 449 device_activity_fetcher_->Start(); |
450 } | 450 } |
451 | 451 |
452 void CrossDevicePromo::RegisterForCookieChanges() { | 452 void CrossDevicePromo::RegisterForCookieChanges() { |
453 cookie_manager_service_->AddObserver(this); | 453 cookie_manager_service_->AddObserver(this); |
454 } | 454 } |
455 | 455 |
456 void CrossDevicePromo::UnregisterForCookieChanges() { | 456 void CrossDevicePromo::UnregisterForCookieChanges() { |
457 cookie_manager_service_->RemoveObserver(this); | 457 cookie_manager_service_->RemoveObserver(this); |
458 } | 458 } |
OLD | NEW |