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

Side by Side Diff: chrome/browser/net/gaia/gaia_oauth_fetcher.cc

Issue 8253002: Move PageTransition into content namespace. While I'm touching all these files, I've also updated... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/net/gaia/gaia_oauth_fetcher.h" 5 #include "chrome/browser/net/gaia/gaia_oauth_fetcher.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 } 277 }
278 } 278 }
279 } 279 }
280 280
281 namespace { 281 namespace {
282 // Based on Browser::OpenURLFromTab 282 // Based on Browser::OpenURLFromTab
283 void OpenGetOAuthTokenURL(Browser* browser, 283 void OpenGetOAuthTokenURL(Browser* browser,
284 const GURL& url, 284 const GURL& url,
285 const GURL& referrer, 285 const GURL& referrer,
286 WindowOpenDisposition disposition, 286 WindowOpenDisposition disposition,
287 PageTransition::Type transition) { 287 content::PageTransition transition) {
288 browser::NavigateParams params( 288 browser::NavigateParams params(
289 browser, 289 browser,
290 url, 290 url,
291 PageTransition::AUTO_BOOKMARK); 291 content::PAGE_TRANSITION_AUTO_BOOKMARK);
292 params.source_contents = 292 params.source_contents =
293 browser->tabstrip_model()->GetTabContentsAt( 293 browser->tabstrip_model()->GetTabContentsAt(
294 browser->tabstrip_model()->GetWrapperIndex(NULL)); 294 browser->tabstrip_model()->GetWrapperIndex(NULL));
295 params.referrer = GURL("chrome://settings/personal"); 295 params.referrer = GURL("chrome://settings/personal");
296 params.disposition = disposition; 296 params.disposition = disposition;
297 params.tabstrip_add_types = TabStripModel::ADD_NONE; 297 params.tabstrip_add_types = TabStripModel::ADD_NONE;
298 params.window_action = browser::NavigateParams::SHOW_WINDOW; 298 params.window_action = browser::NavigateParams::SHOW_WINDOW;
299 params.window_bounds = gfx::Rect(380, 520); 299 params.window_bounds = gfx::Rect(380, 520);
300 params.user_gesture = true; 300 params.user_gesture = true;
301 browser::Navigate(&params); 301 browser::Navigate(&params);
(...skipping 10 matching lines...) Expand all
312 Source<Profile>(profile_)); 312 Source<Profile>(profile_));
313 313
314 Browser* browser = BrowserList::GetLastActiveWithProfile(profile_); 314 Browser* browser = BrowserList::GetLastActiveWithProfile(profile_);
315 DCHECK(browser); 315 DCHECK(browser);
316 316
317 OpenGetOAuthTokenURL(browser, 317 OpenGetOAuthTokenURL(browser,
318 MakeGetOAuthTokenUrl(GaiaUrls::GetInstance()->oauth1_login_scope(), 318 MakeGetOAuthTokenUrl(GaiaUrls::GetInstance()->oauth1_login_scope(),
319 l10n_util::GetStringUTF8(IDS_PRODUCT_NAME)), 319 l10n_util::GetStringUTF8(IDS_PRODUCT_NAME)),
320 GURL("chrome://settings/personal"), 320 GURL("chrome://settings/personal"),
321 NEW_POPUP, 321 NEW_POPUP,
322 PageTransition::AUTO_BOOKMARK); 322 content::PAGE_TRANSITION_AUTO_BOOKMARK);
323 popup_ = BrowserList::GetLastActiveWithProfile(profile_); 323 popup_ = BrowserList::GetLastActiveWithProfile(profile_);
324 DCHECK(popup_ && popup_ != browser); 324 DCHECK(popup_ && popup_ != browser);
325 registrar_.Add(this, 325 registrar_.Add(this,
326 chrome::NOTIFICATION_BROWSER_CLOSING, 326 chrome::NOTIFICATION_BROWSER_CLOSING,
327 Source<Browser>(popup_)); 327 Source<Browser>(popup_));
328 } 328 }
329 329
330 void GaiaOAuthFetcher::StartOAuthLogin( 330 void GaiaOAuthFetcher::StartOAuthLogin(
331 const char* source, 331 const char* source,
332 const char* service, 332 const char* service,
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 true)) { 679 true)) {
680 OnOAuthRevokeTokenFetched(data, status, response_code); 680 OnOAuthRevokeTokenFetched(data, status, response_code);
681 } else { 681 } else {
682 NOTREACHED(); 682 NOTREACHED();
683 } 683 }
684 } 684 }
685 685
686 bool GaiaOAuthFetcher::ShouldAutoFetch(AutoFetchLimit fetch_step) { 686 bool GaiaOAuthFetcher::ShouldAutoFetch(AutoFetchLimit fetch_step) {
687 return fetch_step <= auto_fetch_limit_; 687 return fetch_step <= auto_fetch_limit_;
688 } 688 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_log_unittest.cc ('k') | chrome/browser/oom_priority_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698