Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(436)

Side by Side Diff: chrome/browser/sync/startup_controller.cc

Issue 1308313003: Componentize chrome/common/sync_util (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_unittest.cc ('k') | chrome/browser/sync/startup_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698