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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_sync_starter.cc

Issue 2785753003: Exclude building signin view controller and its delegate on ChromeOS (Closed)
Patch Set: Exclude SigninViewController on ChromeOS Created 3 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/sync/one_click_signin_sync_starter.h" 5 #include "chrome/browser/ui/sync/one_click_signin_sync_starter.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "base/metrics/user_metrics.h" 10 #include "base/metrics/user_metrics.h"
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 546
547 void OneClickSigninSyncStarter::DisplayFinalConfirmationBubble( 547 void OneClickSigninSyncStarter::DisplayFinalConfirmationBubble(
548 const base::string16& custom_message) { 548 const base::string16& custom_message) {
549 browser_ = EnsureBrowser(browser_, profile_); 549 browser_ = EnsureBrowser(browser_, profile_);
550 LoginUIServiceFactory::GetForProfile(browser_->profile()) 550 LoginUIServiceFactory::GetForProfile(browser_->profile())
551 ->DisplayLoginResult(browser_, custom_message, base::string16()); 551 ->DisplayLoginResult(browser_, custom_message, base::string16());
552 } 552 }
553 553
554 void OneClickSigninSyncStarter::DisplayModalSyncConfirmationWindow() { 554 void OneClickSigninSyncStarter::DisplayModalSyncConfirmationWindow() {
555 browser_ = EnsureBrowser(browser_, profile_); 555 browser_ = EnsureBrowser(browser_, profile_);
556 browser_->ShowModalSyncConfirmationWindow(); 556 browser_->signin_view_controller()->ShowModalSyncConfirmationDialog(browser_);
557 } 557 }
558 558
559 // static 559 // static
560 Browser* OneClickSigninSyncStarter::EnsureBrowser(Browser* browser, 560 Browser* OneClickSigninSyncStarter::EnsureBrowser(Browser* browser,
561 Profile* profile) { 561 Profile* profile) {
562 if (!browser) { 562 if (!browser) {
563 // The user just created a new profile or has closed the browser that 563 // The user just created a new profile or has closed the browser that
564 // we used previously. Grab the most recently active browser or else 564 // we used previously. Grab the most recently active browser or else
565 // create a new one. 565 // create a new one.
566 browser = chrome::FindLastActiveWithProfile(profile); 566 browser = chrome::FindLastActiveWithProfile(profile);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 false /* user_gesture */); 667 false /* user_gesture */);
668 } 668 }
669 669
670 void OneClickSigninSyncStarter::LoadContinueUrl() { 670 void OneClickSigninSyncStarter::LoadContinueUrl() {
671 web_contents()->GetController().LoadURL( 671 web_contents()->GetController().LoadURL(
672 continue_url_, 672 continue_url_,
673 content::Referrer(), 673 content::Referrer(),
674 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, 674 ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
675 std::string()); 675 std::string());
676 } 676 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm ('k') | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698