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

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

Issue 8735007: Unswap sync backend initialize histograms (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/profile_sync_service.h" 5 #include "chrome/browser/sync/profile_sync_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstddef> 8 #include <cstddef>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 << " -- ProfileSyncService unusable: " << message; 548 << " -- ProfileSyncService unusable: " << message;
549 549
550 // Shut all data types down. 550 // Shut all data types down.
551 MessageLoop::current()->PostTask(FROM_HERE, 551 MessageLoop::current()->PostTask(FROM_HERE,
552 scoped_runnable_method_factory_.NewRunnableMethod( 552 scoped_runnable_method_factory_.NewRunnableMethod(
553 &ProfileSyncService::Shutdown, true)); 553 &ProfileSyncService::Shutdown, true));
554 } 554 }
555 555
556 void ProfileSyncService::OnBackendInitialized( 556 void ProfileSyncService::OnBackendInitialized(
557 const WeakHandle<JsBackend>& js_backend, bool success) { 557 const WeakHandle<JsBackend>& js_backend, bool success) {
558 if (HasSyncSetupCompleted()) { 558 if (!HasSyncSetupCompleted()) {
559 UMA_HISTOGRAM_BOOLEAN("Sync.FirstBackendInitializeSuccess", success); 559 UMA_HISTOGRAM_BOOLEAN("Sync.BackendInitializeFirstTimeSuccess", success);
560 } else { 560 } else {
561 UMA_HISTOGRAM_BOOLEAN("Sync.RestoreBackendInitializeSuccess", success); 561 UMA_HISTOGRAM_BOOLEAN("Sync.BackendInitializeRestoreSuccess", success);
562 } 562 }
563 563
564 if (!success) { 564 if (!success) {
565 // Something went unexpectedly wrong. Play it safe: nuke our current state 565 // Something went unexpectedly wrong. Play it safe: nuke our current state
566 // and prepare ourselves to try again later. 566 // and prepare ourselves to try again later.
567 DisableForUser(); 567 DisableForUser();
568 return; 568 return;
569 } 569 }
570 570
571 backend_initialized_ = true; 571 backend_initialized_ = true;
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 << "Unrecoverable error."; 1549 << "Unrecoverable error.";
1550 } else { 1550 } else {
1551 VLOG(0) << "ConfigureDataTypeManager not invoked because backend is not " 1551 VLOG(0) << "ConfigureDataTypeManager not invoked because backend is not "
1552 << "initialized"; 1552 << "initialized";
1553 } 1553 }
1554 } 1554 }
1555 1555
1556 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() { 1556 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() {
1557 return failed_datatypes_handler_; 1557 return failed_datatypes_handler_;
1558 } 1558 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698