OLD | NEW |
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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 DisplayGaiaLoginInNewTabOrWindow(access_point); | 262 DisplayGaiaLoginInNewTabOrWindow(access_point); |
263 } | 263 } |
264 | 264 |
265 void PeopleHandler::DisplayGaiaLoginInNewTabOrWindow( | 265 void PeopleHandler::DisplayGaiaLoginInNewTabOrWindow( |
266 signin_metrics::AccessPoint access_point) { | 266 signin_metrics::AccessPoint access_point) { |
267 Browser* browser = | 267 Browser* browser = |
268 chrome::FindBrowserWithWebContents(web_ui()->GetWebContents()); | 268 chrome::FindBrowserWithWebContents(web_ui()->GetWebContents()); |
269 bool force_new_tab = false; | 269 bool force_new_tab = false; |
270 if (!browser) { | 270 if (!browser) { |
271 // Settings is not displayed in a browser window. Open a new window. | 271 // Settings is not displayed in a browser window. Open a new window. |
272 browser = | 272 browser = new Browser( |
273 new Browser(Browser::CreateParams(Browser::TYPE_TABBED, profile_)); | 273 Browser::CreateParams(Browser::TYPE_TABBED, profile_, true)); |
274 force_new_tab = true; | 274 force_new_tab = true; |
275 } | 275 } |
276 | 276 |
277 // If the signin manager already has an authenticated username, this is a | 277 // If the signin manager already has an authenticated username, this is a |
278 // re-auth scenario, and we need to ensure that the user signs in with the | 278 // re-auth scenario, and we need to ensure that the user signs in with the |
279 // same email address. | 279 // same email address. |
280 GURL url; | 280 GURL url; |
281 if (SigninManagerFactory::GetForProfile(browser->profile()) | 281 if (SigninManagerFactory::GetForProfile(browser->profile()) |
282 ->IsAuthenticated()) { | 282 ->IsAuthenticated()) { |
283 UMA_HISTOGRAM_ENUMERATION("Signin.Reauth", | 283 UMA_HISTOGRAM_ENUMERATION("Signin.Reauth", |
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 base::FilePath profile_file_path = profile_->GetPath(); | 914 base::FilePath profile_file_path = profile_->GetPath(); |
915 ProfileMetrics::LogProfileSyncSignIn(profile_file_path); | 915 ProfileMetrics::LogProfileSyncSignIn(profile_file_path); |
916 | 916 |
917 // We're done configuring, so notify ProfileSyncService that it is OK to | 917 // We're done configuring, so notify ProfileSyncService that it is OK to |
918 // start syncing. | 918 // start syncing. |
919 sync_blocker_.reset(); | 919 sync_blocker_.reset(); |
920 service->SetFirstSetupComplete(); | 920 service->SetFirstSetupComplete(); |
921 } | 921 } |
922 | 922 |
923 } // namespace settings | 923 } // namespace settings |
OLD | NEW |