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

Side by Side Diff: components/sync/driver/startup_controller.cc

Issue 2395533003: [Sync] Move some things from driver to base. (Closed)
Patch Set: Rebase. Created 4 years, 2 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 "components/sync/driver/startup_controller.h" 5 #include "components/sync/driver/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_macros.h" 9 #include "base/metrics/histogram_macros.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/threading/thread_task_runner_handle.h" 12 #include "base/threading/thread_task_runner_handle.h"
13 #include "components/sync/base/sync_prefs.h"
13 #include "components/sync/driver/sync_driver_switches.h" 14 #include "components/sync/driver/sync_driver_switches.h"
14 #include "components/sync/driver/sync_prefs.h"
15 15
16 namespace syncer { 16 namespace syncer {
17 17
18 namespace { 18 namespace {
19 19
20 // The amount of time we'll wait to initialize sync if no data type triggers 20 // The amount of time we'll wait to initialize sync if no data type triggers
21 // initialization via a StartSyncFlare. 21 // initialization via a StartSyncFlare.
22 const int kDeferredInitFallbackSeconds = 10; 22 const int kDeferredInitFallbackSeconds = 10;
23 23
24 // Enum (for UMA, primarily) defining different events that cause us to 24 // Enum (for UMA, primarily) defining different events that cause us to
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 if (!start_up_time_.is_null()) { 191 if (!start_up_time_.is_null()) {
192 RecordTimeDeferred(); 192 RecordTimeDeferred();
193 UMA_HISTOGRAM_ENUMERATION("Sync.Startup.DeferredInitTrigger", 193 UMA_HISTOGRAM_ENUMERATION("Sync.Startup.DeferredInitTrigger",
194 TRIGGER_DATA_TYPE_REQUEST, MAX_TRIGGER_VALUE); 194 TRIGGER_DATA_TYPE_REQUEST, MAX_TRIGGER_VALUE);
195 } 195 }
196 received_start_request_ = true; 196 received_start_request_ = true;
197 TryStart(); 197 TryStart();
198 } 198 }
199 199
200 } // namespace syncer 200 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/driver/pref_names.cc ('k') | components/sync/driver/startup_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698