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

Side by Side Diff: chrome/browser/ui/webui/options/sync_setup_handler.cc

Issue 2244733002: Settings Sync: Fix CloseUI logic in both Settings and MD Settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix guest mode crash Created 4 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/settings/people_handler.cc » ('j') | 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) 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/ui/webui/options/sync_setup_handler.h" 5 #include "chrome/browser/ui/webui/options/sync_setup_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 // TODO(rsimha): Revisit this for M30. See http://crbug.com/252049. 712 // TODO(rsimha): Revisit this for M30. See http://crbug.com/252049.
713 if (sync_service->IsFirstSetupInProgress()) { 713 if (sync_service->IsFirstSetupInProgress()) {
714 SigninManagerFactory::GetForProfile(GetProfile()) 714 SigninManagerFactory::GetForProfile(GetProfile())
715 ->SignOut(signin_metrics::ABORT_SIGNIN, 715 ->SignOut(signin_metrics::ABORT_SIGNIN,
716 signin_metrics::SignoutDelete::IGNORE_METRIC); 716 signin_metrics::SignoutDelete::IGNORE_METRIC);
717 } 717 }
718 #endif 718 #endif
719 } 719 }
720 } 720 }
721 } 721 }
722 }
722 723
723 GetLoginUIService()->LoginUIClosed(this); 724 LoginUIService* service = GetLoginUIService();
724 } 725 if (service)
726 service->LoginUIClosed(this);
725 727
726 // Alert the sync service anytime the sync setup dialog is closed. This can 728 // Alert the sync service anytime the sync setup dialog is closed. This can
727 // happen due to the user clicking the OK or Cancel button, or due to the 729 // happen due to the user clicking the OK or Cancel button, or due to the
728 // dialog being closed by virtue of sync being disabled in the background. 730 // dialog being closed by virtue of sync being disabled in the background.
729 sync_blocker_.reset(); 731 sync_blocker_.reset();
730 732
731 configuring_sync_ = false; 733 configuring_sync_ = false;
732 } 734 }
733 735
734 void SyncSetupHandler::OpenSyncSetup(bool creating_supervised_user) { 736 void SyncSetupHandler::OpenSyncSetup(bool creating_supervised_user) {
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 page, args); 943 page, args);
942 944
943 // Make sure the tab used for the Gaia sign in does not cover the settings 945 // Make sure the tab used for the Gaia sign in does not cover the settings
944 // tab. 946 // tab.
945 FocusUI(); 947 FocusUI();
946 } 948 }
947 949
948 LoginUIService* SyncSetupHandler::GetLoginUIService() const { 950 LoginUIService* SyncSetupHandler::GetLoginUIService() const {
949 return LoginUIServiceFactory::GetForProfile(GetProfile()); 951 return LoginUIServiceFactory::GetForProfile(GetProfile());
950 } 952 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/settings/people_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698