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

Side by Side Diff: chrome/browser/ui/webui/settings/people_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/settings/people_handler.h" 5 #include "chrome/browser/ui/webui/settings/people_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 15 matching lines...) Expand all
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/sync/sync_ui_util.h" 31 #include "chrome/browser/sync/sync_ui_util.h"
32 #include "chrome/browser/ui/browser_finder.h" 32 #include "chrome/browser/ui/browser_finder.h"
33 #include "chrome/browser/ui/browser_window.h" 33 #include "chrome/browser/ui/browser_window.h"
34 #include "chrome/browser/ui/singleton_tabs.h" 34 #include "chrome/browser/ui/singleton_tabs.h"
35 #include "chrome/browser/ui/user_manager.h" 35 #include "chrome/browser/ui/user_manager.h"
36 #include "chrome/browser/ui/webui/options/options_handlers_helper.h" 36 #include "chrome/browser/ui/webui/profile_helper.h"
37 #include "chrome/browser/ui/webui/signin/login_ui_service.h" 37 #include "chrome/browser/ui/webui/signin/login_ui_service.h"
38 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" 38 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
39 #include "chrome/common/chrome_switches.h" 39 #include "chrome/common/chrome_switches.h"
40 #include "chrome/grit/generated_resources.h" 40 #include "chrome/grit/generated_resources.h"
41 #include "components/browser_sync/browser/profile_sync_service.h" 41 #include "components/browser_sync/browser/profile_sync_service.h"
42 #include "components/prefs/pref_service.h" 42 #include "components/prefs/pref_service.h"
43 #include "components/signin/core/browser/signin_error_controller.h" 43 #include "components/signin/core/browser/signin_error_controller.h"
44 #include "components/signin/core/browser/signin_header_helper.h" 44 #include "components/signin/core/browser/signin_header_helper.h"
45 #include "components/signin/core/browser/signin_metrics.h" 45 #include "components/signin/core/browser/signin_metrics.h"
46 #include "components/signin/core/common/profile_management_switches.h" 46 #include "components/signin/core/common/profile_management_switches.h"
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 bool delete_profile = false; 638 bool delete_profile = false;
639 args->GetBoolean(0, &delete_profile); 639 args->GetBoolean(0, &delete_profile);
640 signin_metrics::SignoutDelete delete_metric = 640 signin_metrics::SignoutDelete delete_metric =
641 delete_profile ? signin_metrics::SignoutDelete::DELETED 641 delete_profile ? signin_metrics::SignoutDelete::DELETED
642 : signin_metrics::SignoutDelete::KEEPING; 642 : signin_metrics::SignoutDelete::KEEPING;
643 SigninManagerFactory::GetForProfile(profile_) 643 SigninManagerFactory::GetForProfile(profile_)
644 ->SignOut(signin_metrics::USER_CLICKED_SIGNOUT_SETTINGS, delete_metric); 644 ->SignOut(signin_metrics::USER_CLICKED_SIGNOUT_SETTINGS, delete_metric);
645 645
646 if (delete_profile) { 646 if (delete_profile) {
647 // Do as BrowserOptionsHandler::DeleteProfile(). 647 // Do as BrowserOptionsHandler::DeleteProfile().
648 options::helper::DeleteProfileAtPath(profile_->GetPath(), web_ui()); 648 webui::DeleteProfileAtPath(profile_->GetPath(), web_ui());
649 } 649 }
650 } 650 }
651 #endif 651 #endif
652 652
653 void PeopleHandler::HandleCloseTimeout(const base::ListValue* args) { 653 void PeopleHandler::HandleCloseTimeout(const base::ListValue* args) {
654 CloseSyncSetup(); 654 CloseSyncSetup();
655 } 655 }
656 656
657 void PeopleHandler::HandleGetSyncStatus(const base::ListValue* /* args */) { 657 void PeopleHandler::HandleGetSyncStatus(const base::ListValue* /* args */) {
658 UpdateSyncState(); 658 UpdateSyncState();
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 void PeopleHandler::UpdateSyncState() { 1018 void PeopleHandler::UpdateSyncState() {
1019 web_ui()->CallJavascriptFunction("settings.SyncPrivateApi.sendSyncStatus", 1019 web_ui()->CallJavascriptFunction("settings.SyncPrivateApi.sendSyncStatus",
1020 *GetSyncStateDictionary()); 1020 *GetSyncStateDictionary());
1021 } 1021 }
1022 1022
1023 void PeopleHandler::OnSigninAllowedPrefChange() { 1023 void PeopleHandler::OnSigninAllowedPrefChange() {
1024 UpdateSyncState(); 1024 UpdateSyncState();
1025 } 1025 }
1026 1026
1027 } // namespace settings 1027 } // namespace settings
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/profile_helper.cc ('k') | chrome/browser/ui/webui/settings/settings_manage_profile_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698