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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_sync_starter.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 (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.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 Browser* OneClickSigninSyncStarter::EnsureBrowser( 540 Browser* OneClickSigninSyncStarter::EnsureBrowser(
541 Browser* browser, 541 Browser* browser,
542 Profile* profile, 542 Profile* profile,
543 chrome::HostDesktopType desktop_type) { 543 chrome::HostDesktopType desktop_type) {
544 if (!browser) { 544 if (!browser) {
545 // The user just created a new profile or has closed the browser that 545 // The user just created a new profile or has closed the browser that
546 // we used previously. Grab the most recently active browser or else 546 // we used previously. Grab the most recently active browser or else
547 // create a new one. 547 // create a new one.
548 browser = chrome::FindLastActiveWithProfile(profile); 548 browser = chrome::FindLastActiveWithProfile(profile);
549 if (!browser) { 549 if (!browser) {
550 browser = new Browser(Browser::CreateParams(profile, 550 browser = new Browser(Browser::CreateParams(profile));
551 desktop_type));
552 chrome::AddTabAt(browser, GURL(), -1, true); 551 chrome::AddTabAt(browser, GURL(), -1, true);
553 } 552 }
554 browser->window()->Show(); 553 browser->window()->Show();
555 } 554 }
556 return browser; 555 return browser;
557 } 556 }
558 557
559 void OneClickSigninSyncStarter::ShowSettingsPage(bool configure_sync) { 558 void OneClickSigninSyncStarter::ShowSettingsPage(bool configure_sync) {
560 // Give the user a chance to configure things. We don't clear the 559 // Give the user a chance to configure things. We don't clear the
561 // ProfileSyncService::setup_in_progress flag because we don't want sync 560 // ProfileSyncService::setup_in_progress flag because we don't want sync
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 false /* user_gesture */); 654 false /* user_gesture */);
656 } 655 }
657 656
658 void OneClickSigninSyncStarter::LoadContinueUrl() { 657 void OneClickSigninSyncStarter::LoadContinueUrl() {
659 web_contents()->GetController().LoadURL( 658 web_contents()->GetController().LoadURL(
660 continue_url_, 659 continue_url_,
661 content::Referrer(), 660 content::Referrer(),
662 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, 661 ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
663 std::string()); 662 std::string());
664 } 663 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698