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

Side by Side Diff: chrome/browser/ui/webui/signin/signin_supervised_user_import_handler.cc

Issue 2685333005: ash: fix regression where ctrl+n put new window on wrong desktop (Closed)
Patch Set: Rebase to ToT Created 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/signin/signin_supervised_user_import_handler.h " 5 #include "chrome/browser/ui/webui/signin/signin_supervised_user_import_handler.h "
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 if (last_used_profile) { 119 if (last_used_profile) {
120 // Last used profile may be the Guest Profile. 120 // Last used profile may be the Guest Profile.
121 if (ProfileManager::IncognitoModeForced(last_used_profile)) 121 if (ProfileManager::IncognitoModeForced(last_used_profile))
122 last_used_profile = last_used_profile->GetOffTheRecordProfile(); 122 last_used_profile = last_used_profile->GetOffTheRecordProfile();
123 123
124 // Get the browser owned by the last used profile or create a new one if 124 // Get the browser owned by the last used profile or create a new one if
125 // it doesn't exist. 125 // it doesn't exist.
126 Browser* browser = chrome::FindLastActiveWithProfile(last_used_profile); 126 Browser* browser = chrome::FindLastActiveWithProfile(last_used_profile);
127 if (!browser) 127 if (!browser)
128 browser = new Browser(Browser::CreateParams(Browser::TYPE_TABBED, 128 browser = new Browser(
129 last_used_profile)); 129 Browser::CreateParams(Browser::TYPE_TABBED, last_used_profile, true));
130 browser->OpenURL(params); 130 browser->OpenURL(params);
131 } 131 }
132 } 132 }
133 133
134 void SigninSupervisedUserImportHandler::AuthenticateCustodian( 134 void SigninSupervisedUserImportHandler::AuthenticateCustodian(
135 const base::ListValue* args) { 135 const base::ListValue* args) {
136 CHECK_EQ(1U, args->GetSize()); 136 CHECK_EQ(1U, args->GetSize());
137 137
138 std::string email; 138 std::string email;
139 bool success = args->GetString(0, &email); 139 bool success = args->GetString(0, &email);
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 312
313 bool SigninSupervisedUserImportHandler::HasAuthError(Profile* profile) const { 313 bool SigninSupervisedUserImportHandler::HasAuthError(Profile* profile) const {
314 SigninErrorController* error_controller = 314 SigninErrorController* error_controller =
315 SigninErrorControllerFactory::GetForProfile(profile); 315 SigninErrorControllerFactory::GetForProfile(profile);
316 if (!error_controller) 316 if (!error_controller)
317 return true; 317 return true;
318 318
319 GoogleServiceAuthError::State state = error_controller->auth_error().state(); 319 GoogleServiceAuthError::State state = error_controller->auth_error().state();
320 return state != GoogleServiceAuthError::NONE; 320 return state != GoogleServiceAuthError::NONE;
321 } 321 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/people_handler.cc ('k') | chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698