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

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

Issue 338993007: Track when and how a profile is signed out via UMA. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: SignOut() param in Android tests Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <cstddef> 7 #include <cstddef>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #include "chrome/common/chrome_version_info.h" 62 #include "chrome/common/chrome_version_info.h"
63 #include "chrome/common/pref_names.h" 63 #include "chrome/common/pref_names.h"
64 #include "chrome/common/url_constants.h" 64 #include "chrome/common/url_constants.h"
65 #include "components/gcm_driver/gcm_driver.h" 65 #include "components/gcm_driver/gcm_driver.h"
66 #include "components/invalidation/invalidation_service.h" 66 #include "components/invalidation/invalidation_service.h"
67 #include "components/invalidation/profile_invalidation_provider.h" 67 #include "components/invalidation/profile_invalidation_provider.h"
68 #include "components/pref_registry/pref_registry_syncable.h" 68 #include "components/pref_registry/pref_registry_syncable.h"
69 #include "components/signin/core/browser/about_signin_internals.h" 69 #include "components/signin/core/browser/about_signin_internals.h"
70 #include "components/signin/core/browser/profile_oauth2_token_service.h" 70 #include "components/signin/core/browser/profile_oauth2_token_service.h"
71 #include "components/signin/core/browser/signin_manager.h" 71 #include "components/signin/core/browser/signin_manager.h"
72 #include "components/signin/core/browser/signin_metrics.h"
72 #include "components/sync_driver/change_processor.h" 73 #include "components/sync_driver/change_processor.h"
73 #include "components/sync_driver/data_type_controller.h" 74 #include "components/sync_driver/data_type_controller.h"
74 #include "components/sync_driver/pref_names.h" 75 #include "components/sync_driver/pref_names.h"
75 #include "components/sync_driver/system_encryptor.h" 76 #include "components/sync_driver/system_encryptor.h"
76 #include "components/sync_driver/user_selectable_sync_type.h" 77 #include "components/sync_driver/user_selectable_sync_type.h"
77 #include "content/public/browser/notification_details.h" 78 #include "content/public/browser/notification_details.h"
78 #include "content/public/browser/notification_service.h" 79 #include "content/public/browser/notification_service.h"
79 #include "content/public/browser/notification_source.h" 80 #include "content/public/browser/notification_source.h"
80 #include "grit/generated_resources.h" 81 #include "grit/generated_resources.h"
81 #include "net/cookies/cookie_monster.h" 82 #include "net/cookies/cookie_monster.h"
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after
1407 ERROR_REASON_ACTIONABLE_ERROR); 1408 ERROR_REASON_ACTIONABLE_ERROR);
1408 break; 1409 break;
1409 case syncer::DISABLE_SYNC_AND_ROLLBACK: 1410 case syncer::DISABLE_SYNC_AND_ROLLBACK:
1410 backup_rollback_controller_.OnRollbackReceived(); 1411 backup_rollback_controller_.OnRollbackReceived();
1411 // Fall through to shutdown backend and sign user out. 1412 // Fall through to shutdown backend and sign user out.
1412 case syncer::DISABLE_SYNC_ON_CLIENT: 1413 case syncer::DISABLE_SYNC_ON_CLIENT:
1413 StopSyncingPermanently(); 1414 StopSyncingPermanently();
1414 #if !defined(OS_CHROMEOS) 1415 #if !defined(OS_CHROMEOS)
1415 // On desktop Chrome, sign out the user after a dashboard clear. 1416 // On desktop Chrome, sign out the user after a dashboard clear.
1416 // Skip sign out on ChromeOS/Android. 1417 // Skip sign out on ChromeOS/Android.
1417 if (!startup_controller_.auto_start_enabled()) 1418 if (!startup_controller_.auto_start_enabled()) {
1418 SigninManagerFactory::GetForProfile(profile_)->SignOut(); 1419 SigninManagerFactory::GetForProfile(profile_)->SignOut(
1420 signin_metrics::SERVER_FORCED_DISABLE);
1421 }
1419 #endif 1422 #endif
1420 break; 1423 break;
1421 case syncer::ROLLBACK_DONE: 1424 case syncer::ROLLBACK_DONE:
1422 backup_rollback_controller_.OnRollbackDone(); 1425 backup_rollback_controller_.OnRollbackDone();
1423 break; 1426 break;
1424 case syncer::STOP_SYNC_FOR_DISABLED_ACCOUNT: 1427 case syncer::STOP_SYNC_FOR_DISABLED_ACCOUNT:
1425 // Sync disabled by domain admin. we should stop syncing until next 1428 // Sync disabled by domain admin. we should stop syncing until next
1426 // restart. 1429 // restart.
1427 sync_disabled_by_admin_ = true; 1430 sync_disabled_by_admin_ = true;
1428 ShutdownImpl(browser_sync::SyncBackendHost::DISABLE_AND_CLAIM_THREAD); 1431 ShutdownImpl(browser_sync::SyncBackendHost::DISABLE_AND_CLAIM_THREAD);
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
2566 if (custom_sync_url.is_valid()) { 2569 if (custom_sync_url.is_valid()) {
2567 result = custom_sync_url; 2570 result = custom_sync_url;
2568 } else { 2571 } else {
2569 LOG(WARNING) << "The following sync URL specified at the command-line " 2572 LOG(WARNING) << "The following sync URL specified at the command-line "
2570 << "is invalid: " << value; 2573 << "is invalid: " << value;
2571 } 2574 }
2572 } 2575 }
2573 } 2576 }
2574 return result; 2577 return result;
2575 } 2578 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_names_io_thread_unittest.cc ('k') | chrome/browser/sync/profile_sync_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698