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

Side by Side Diff: chrome/browser/ui/webui/settings/people_handler.cc

Issue 1662783002: Remove HostDesktopType from Browser::CreateParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-12
Patch Set: remove desktop_type_ in bookmark_bubble_sign_in_delegate Created 4 years, 10 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 DisplayGaiaLoginInNewTabOrWindow(access_point); 312 DisplayGaiaLoginInNewTabOrWindow(access_point);
313 } 313 }
314 314
315 void PeopleHandler::DisplayGaiaLoginInNewTabOrWindow( 315 void PeopleHandler::DisplayGaiaLoginInNewTabOrWindow(
316 signin_metrics::AccessPoint access_point) { 316 signin_metrics::AccessPoint access_point) {
317 Browser* browser = 317 Browser* browser =
318 chrome::FindBrowserWithWebContents(web_ui()->GetWebContents()); 318 chrome::FindBrowserWithWebContents(web_ui()->GetWebContents());
319 bool force_new_tab = false; 319 bool force_new_tab = false;
320 if (!browser) { 320 if (!browser) {
321 // Settings is not displayed in a browser window. Open a new window. 321 // Settings is not displayed in a browser window. Open a new window.
322 browser = new Browser(Browser::CreateParams(Browser::TYPE_TABBED, profile_, 322 browser =
323 chrome::GetActiveDesktop())); 323 new Browser(Browser::CreateParams(Browser::TYPE_TABBED, profile_));
324 force_new_tab = true; 324 force_new_tab = true;
325 } 325 }
326 326
327 // If the signin manager already has an authenticated username, this is a 327 // If the signin manager already has an authenticated username, this is a
328 // re-auth scenario, and we need to ensure that the user signs in with the 328 // re-auth scenario, and we need to ensure that the user signs in with the
329 // same email address. 329 // same email address.
330 GURL url; 330 GURL url;
331 if (SigninManagerFactory::GetForProfile(browser->profile()) 331 if (SigninManagerFactory::GetForProfile(browser->profile())
332 ->IsAuthenticated()) { 332 ->IsAuthenticated()) {
333 UMA_HISTOGRAM_ENUMERATION("Signin.Reauth", 333 UMA_HISTOGRAM_ENUMERATION("Signin.Reauth",
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 void PeopleHandler::UpdateSyncState() { 1000 void PeopleHandler::UpdateSyncState() {
1001 web_ui()->CallJavascriptFunction("settings.SyncPrivateApi.sendSyncStatus", 1001 web_ui()->CallJavascriptFunction("settings.SyncPrivateApi.sendSyncStatus",
1002 *GetSyncStateDictionary()); 1002 *GetSyncStateDictionary());
1003 } 1003 }
1004 1004
1005 void PeopleHandler::OnSigninAllowedPrefChange() { 1005 void PeopleHandler::OnSigninAllowedPrefChange() {
1006 UpdateSyncState(); 1006 UpdateSyncState();
1007 } 1007 }
1008 1008
1009 } // namespace settings 1009 } // namespace settings
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/print_preview/print_preview_handler.cc ('k') | chrome/browser/ui/webui/signin/login_ui_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698