| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |