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

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

Issue 1659203002: Remove HostDesktopType from FindLastActive[WithProfile] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nullptr 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 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 538
539 // static 539 // static
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, desktop_type); 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)); 551 desktop_type));
552 chrome::AddTabAt(browser, GURL(), -1, true); 552 chrome::AddTabAt(browser, GURL(), -1, true);
553 } 553 }
554 browser->window()->Show(); 554 browser->window()->Show();
555 } 555 }
556 return browser; 556 return browser;
557 } 557 }
558 558
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 false /* user_gesture */); 655 false /* user_gesture */);
656 } 656 }
657 657
658 void OneClickSigninSyncStarter::LoadContinueUrl() { 658 void OneClickSigninSyncStarter::LoadContinueUrl() {
659 web_contents()->GetController().LoadURL( 659 web_contents()->GetController().LoadURL(
660 continue_url_, 660 continue_url_,
661 content::Referrer(), 661 content::Referrer(),
662 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, 662 ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
663 std::string()); 663 std::string());
664 } 664 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/startup/default_browser_prompt.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698