| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/sync/startup_controller.h" | 5 #include "chrome/browser/sync/startup_controller.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| 11 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
| 12 #include "base/thread_task_runner_handle.h" | 12 #include "base/thread_task_runner_handle.h" |
| 13 #include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h" | 13 #include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h" |
| 14 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
| 15 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 15 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
| 16 #include "components/sync_driver/sync_driver_switches.h" |
| 16 #include "components/sync_driver/sync_prefs.h" | 17 #include "components/sync_driver/sync_prefs.h" |
| 17 | 18 |
| 18 namespace browser_sync { | 19 namespace browser_sync { |
| 19 | 20 |
| 20 namespace { | 21 namespace { |
| 21 | 22 |
| 22 // The amount of time we'll wait to initialize sync if no data type triggers | 23 // The amount of time we'll wait to initialize sync if no data type triggers |
| 23 // initialization via a StartSyncFlare. | 24 // initialization via a StartSyncFlare. |
| 24 const int kDeferredInitFallbackSeconds = 10; | 25 const int kDeferredInitFallbackSeconds = 10; |
| 25 | 26 |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 syncer::MODEL_TYPE_COUNT); | 234 syncer::MODEL_TYPE_COUNT); |
| 234 UMA_HISTOGRAM_ENUMERATION("Sync.Startup.DeferredInitTrigger", | 235 UMA_HISTOGRAM_ENUMERATION("Sync.Startup.DeferredInitTrigger", |
| 235 TRIGGER_DATA_TYPE_REQUEST, | 236 TRIGGER_DATA_TYPE_REQUEST, |
| 236 MAX_TRIGGER_VALUE); | 237 MAX_TRIGGER_VALUE); |
| 237 } | 238 } |
| 238 received_start_request_ = true; | 239 received_start_request_ = true; |
| 239 TryStart(); | 240 TryStart(); |
| 240 } | 241 } |
| 241 | 242 |
| 242 } // namespace browser_sync | 243 } // namespace browser_sync |
| OLD | NEW |