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

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

Issue 646983008: Implement signin using webview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a listener interface and remove events Created 6 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/inline_login_handler_impl.h" 5 #include "chrome/browser/ui/webui/signin/inline_login_handler_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 if (!can_offer) { 371 if (!can_offer) {
372 HandleLoginError(error_msg); 372 HandleLoginError(error_msg);
373 return; 373 return;
374 } 374 }
375 375
376 AboutSigninInternals* about_signin_internals = 376 AboutSigninInternals* about_signin_internals =
377 AboutSigninInternalsFactory::GetForProfile(Profile::FromWebUI(web_ui())); 377 AboutSigninInternalsFactory::GetForProfile(Profile::FromWebUI(web_ui()));
378 about_signin_internals->OnAuthenticationResultReceived( 378 about_signin_internals->OnAuthenticationResultReceived(
379 "GAIA Auth Successful"); 379 "GAIA Auth Successful");
380 380
381 GURL partition_url(switches::IsEnableWebviewBasedSignin() ?
382 "chrome-guest://chrome-signin/?" :
383 chrome::kChromeUIChromeSigninURL);
381 content::StoragePartition* partition = 384 content::StoragePartition* partition =
382 content::BrowserContext::GetStoragePartitionForSite( 385 content::BrowserContext::GetStoragePartitionForSite(
383 contents->GetBrowserContext(), 386 contents->GetBrowserContext(), partition_url);
384 GURL(chrome::kChromeUIChromeSigninURL));
385 387
386 SigninClient* signin_client = 388 SigninClient* signin_client =
387 ChromeSigninClientFactory::GetForProfile(Profile::FromWebUI(web_ui())); 389 ChromeSigninClientFactory::GetForProfile(Profile::FromWebUI(web_ui()));
388 std::string signin_scoped_device_id = 390 std::string signin_scoped_device_id =
389 signin_client->GetSigninScopedDeviceId(); 391 signin_client->GetSigninScopedDeviceId();
390 // InlineSigninHelper will delete itself. 392 // InlineSigninHelper will delete itself.
391 new InlineSigninHelper(GetWeakPtr(), partition->GetURLRequestContext(), 393 new InlineSigninHelper(GetWeakPtr(), partition->GetURLRequestContext(),
392 Profile::FromWebUI(web_ui()), current_url, 394 Profile::FromWebUI(web_ui()), current_url,
393 email, password, session_index, 395 email, password, session_index,
394 signin_scoped_device_id, choose_what_to_sync, 396 signin_scoped_device_id, choose_what_to_sync,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 } 460 }
459 } 461 }
460 462
461 if (show_account_management) { 463 if (show_account_management) {
462 browser->window()->ShowAvatarBubbleFromAvatarButton( 464 browser->window()->ShowAvatarBubbleFromAvatarButton(
463 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, 465 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT,
464 signin::ManageAccountsParams()); 466 signin::ManageAccountsParams());
465 } 467 }
466 } 468 }
467 } 469 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698