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

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

Issue 1716163005: MD user manager (C++ for create profile flow) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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 (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 13 matching lines...) Expand all
24 #include "chrome/browser/profiles/profile.h" 24 #include "chrome/browser/profiles/profile.h"
25 #include "chrome/browser/profiles/profile_metrics.h" 25 #include "chrome/browser/profiles/profile_metrics.h"
26 #include "chrome/browser/signin/chrome_signin_helper.h" 26 #include "chrome/browser/signin/chrome_signin_helper.h"
27 #include "chrome/browser/signin/signin_error_controller_factory.h" 27 #include "chrome/browser/signin/signin_error_controller_factory.h"
28 #include "chrome/browser/signin/signin_manager_factory.h" 28 #include "chrome/browser/signin/signin_manager_factory.h"
29 #include "chrome/browser/signin/signin_promo.h" 29 #include "chrome/browser/signin/signin_promo.h"
30 #include "chrome/browser/sync/profile_sync_service_factory.h" 30 #include "chrome/browser/sync/profile_sync_service_factory.h"
31 #include "chrome/browser/ui/browser_finder.h" 31 #include "chrome/browser/ui/browser_finder.h"
32 #include "chrome/browser/ui/browser_window.h" 32 #include "chrome/browser/ui/browser_window.h"
33 #include "chrome/browser/ui/singleton_tabs.h" 33 #include "chrome/browser/ui/singleton_tabs.h"
34 #include "chrome/browser/ui/webui/options/options_handlers_helper.h" 34 #include "chrome/browser/ui/webui/profile_helper.h"
35 #include "chrome/browser/ui/webui/signin/login_ui_service.h" 35 #include "chrome/browser/ui/webui/signin/login_ui_service.h"
36 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" 36 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
37 #include "chrome/common/chrome_switches.h" 37 #include "chrome/common/chrome_switches.h"
38 #include "chrome/common/url_constants.h" 38 #include "chrome/common/url_constants.h"
39 #include "chrome/grit/chromium_strings.h" 39 #include "chrome/grit/chromium_strings.h"
40 #include "chrome/grit/generated_resources.h" 40 #include "chrome/grit/generated_resources.h"
41 #include "chrome/grit/locale_settings.h" 41 #include "chrome/grit/locale_settings.h"
42 #include "components/autofill/core/common/autofill_constants.h" 42 #include "components/autofill/core/common/autofill_constants.h"
43 #include "components/autofill/core/common/autofill_pref_names.h" 43 #include "components/autofill/core/common/autofill_pref_names.h"
44 #include "components/browser_sync/browser/profile_sync_service.h" 44 #include "components/browser_sync/browser/profile_sync_service.h"
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 bool delete_profile = false; 678 bool delete_profile = false;
679 args->GetBoolean(0, &delete_profile); 679 args->GetBoolean(0, &delete_profile);
680 signin_metrics::SignoutDelete delete_metric = 680 signin_metrics::SignoutDelete delete_metric =
681 delete_profile ? signin_metrics::SignoutDelete::DELETED 681 delete_profile ? signin_metrics::SignoutDelete::DELETED
682 : signin_metrics::SignoutDelete::KEEPING; 682 : signin_metrics::SignoutDelete::KEEPING;
683 SigninManagerFactory::GetForProfile(GetProfile()) 683 SigninManagerFactory::GetForProfile(GetProfile())
684 ->SignOut(signin_metrics::USER_CLICKED_SIGNOUT_SETTINGS, delete_metric); 684 ->SignOut(signin_metrics::USER_CLICKED_SIGNOUT_SETTINGS, delete_metric);
685 685
686 if (delete_profile) { 686 if (delete_profile) {
687 // Do as BrowserOptionsHandler::DeleteProfile(). 687 // Do as BrowserOptionsHandler::DeleteProfile().
688 options::helper::DeleteProfileAtPath(GetProfile()->GetPath(), web_ui()); 688 webui::DeleteProfileAtPath(GetProfile()->GetPath(), web_ui());
689 } 689 }
690 } 690 }
691 #endif 691 #endif
692 692
693 void SyncSetupHandler::HandleCloseTimeout(const base::ListValue* args) { 693 void SyncSetupHandler::HandleCloseTimeout(const base::ListValue* args) {
694 CloseSyncSetup(); 694 CloseSyncSetup();
695 } 695 }
696 696
697 void SyncSetupHandler::CloseSyncSetup() { 697 void SyncSetupHandler::CloseSyncSetup() {
698 // Stop a timer to handle timeout in waiting for checking network connection. 698 // Stop a timer to handle timeout in waiting for checking network connection.
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 "SyncSetupOverlay.showSyncSetupPage", page, args); 957 "SyncSetupOverlay.showSyncSetupPage", page, args);
958 958
959 // Make sure the tab used for the Gaia sign in does not cover the settings 959 // Make sure the tab used for the Gaia sign in does not cover the settings
960 // tab. 960 // tab.
961 FocusUI(); 961 FocusUI();
962 } 962 }
963 963
964 LoginUIService* SyncSetupHandler::GetLoginUIService() const { 964 LoginUIService* SyncSetupHandler::GetLoginUIService() const {
965 return LoginUIServiceFactory::GetForProfile(GetProfile()); 965 return LoginUIServiceFactory::GetForProfile(GetProfile());
966 } 966 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/options_handlers_helper.cc ('k') | chrome/browser/ui/webui/profile_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698