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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 if (!continue_url_.is_empty()) { 592 if (!continue_url_.is_empty()) {
593 // The observer deletes itself once it's done. 593 // The observer deletes itself once it's done.
594 DCHECK(!sub_page.empty()); 594 DCHECK(!sub_page.empty());
595 new OneClickSigninSyncObserver(contents, continue_url_); 595 new OneClickSigninSyncObserver(contents, continue_url_);
596 } 596 }
597 597
598 GURL url = chrome::GetSettingsUrl(sub_page); 598 GURL url = chrome::GetSettingsUrl(sub_page);
599 content::OpenURLParams params(url, 599 content::OpenURLParams params(url,
600 content::Referrer(), 600 content::Referrer(),
601 CURRENT_TAB, 601 CURRENT_TAB,
602 content::PAGE_TRANSITION_AUTO_TOPLEVEL, 602 ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
603 false); 603 false);
604 contents->OpenURL(params); 604 contents->OpenURL(params);
605 605
606 // Activate the tab. 606 // Activate the tab.
607 Browser* browser = chrome::FindBrowserWithWebContents(contents); 607 Browser* browser = chrome::FindBrowserWithWebContents(contents);
608 int content_index = 608 int content_index =
609 browser->tab_strip_model()->GetIndexOfWebContents(contents); 609 browser->tab_strip_model()->GetIndexOfWebContents(contents);
610 browser->tab_strip_model()->ActivateTabAt(content_index, 610 browser->tab_strip_model()->ActivateTabAt(content_index,
611 false /* user_gesture */); 611 false /* user_gesture */);
612 } 612 }
613 613
614 void OneClickSigninSyncStarter::LoadContinueUrl() { 614 void OneClickSigninSyncStarter::LoadContinueUrl() {
615 web_contents()->GetController().LoadURL( 615 web_contents()->GetController().LoadURL(
616 continue_url_, 616 continue_url_,
617 content::Referrer(), 617 content::Referrer(),
618 content::PAGE_TRANSITION_AUTO_TOPLEVEL, 618 ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
619 std::string()); 619 std::string());
620 } 620 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698