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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_sync_observer.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_observer.h" 5 #include "chrome/browser/ui/sync/one_click_signin_sync_observer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/signin/signin_promo.h" 10 #include "chrome/browser/signin/signin_promo.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 89
90 sync_service->RemoveObserver(this); 90 sync_service->RemoveObserver(this);
91 delete this; 91 delete this;
92 } 92 }
93 93
94 void OneClickSigninSyncObserver::LoadContinueUrl() { 94 void OneClickSigninSyncObserver::LoadContinueUrl() {
95 web_contents()->GetController().LoadURL( 95 web_contents()->GetController().LoadURL(
96 continue_url_, 96 continue_url_,
97 content::Referrer(), 97 content::Referrer(),
98 content::PAGE_TRANSITION_AUTO_TOPLEVEL, 98 ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
99 std::string()); 99 std::string());
100 } 100 }
101 101
102 ProfileSyncService* OneClickSigninSyncObserver::GetSyncService( 102 ProfileSyncService* OneClickSigninSyncObserver::GetSyncService(
103 content::WebContents* web_contents) { 103 content::WebContents* web_contents) {
104 Profile* profile = 104 Profile* profile =
105 Profile::FromBrowserContext(web_contents->GetBrowserContext()); 105 Profile::FromBrowserContext(web_contents->GetBrowserContext());
106 return ProfileSyncServiceFactory::GetForProfile(profile); 106 return ProfileSyncServiceFactory::GetForProfile(profile);
107 } 107 }
108 108
109 // static 109 // static
110 void OneClickSigninSyncObserver::DeleteObserver( 110 void OneClickSigninSyncObserver::DeleteObserver(
111 base::WeakPtr<OneClickSigninSyncObserver> observer) { 111 base::WeakPtr<OneClickSigninSyncObserver> observer) {
112 if (observer) 112 if (observer)
113 delete observer.get(); 113 delete observer.get();
114 } 114 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_helper_unittest.cc ('k') | chrome/browser/ui/sync/one_click_signin_sync_starter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698