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

Side by Side Diff: chrome/browser/ui/browser_navigator.cc

Issue 8785004: Change NavigationController::LoadURL to take a Referrer class instead of a GURL as referrer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years 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
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/cocoa/constrained_html_delegate_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ui/browser_navigator.h" 5 #include "chrome/browser/ui/browser_navigator.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 const GURL& url, 246 const GURL& url,
247 browser::NavigateParams* params, 247 browser::NavigateParams* params,
248 const std::string& extra_headers) { 248 const std::string& extra_headers) {
249 if (params->transferred_global_request_id != GlobalRequestID()) { 249 if (params->transferred_global_request_id != GlobalRequestID()) {
250 target_contents->controller().TransferURL( 250 target_contents->controller().TransferURL(
251 url, params->referrer, params->transition, extra_headers, 251 url, params->referrer, params->transition, extra_headers,
252 params->transferred_global_request_id, 252 params->transferred_global_request_id,
253 params->is_renderer_initiated); 253 params->is_renderer_initiated);
254 } else if (params->is_renderer_initiated) { 254 } else if (params->is_renderer_initiated) {
255 target_contents->controller().LoadURLFromRenderer( 255 target_contents->controller().LoadURLFromRenderer(
256 url, params->referrer, params->transition, extra_headers); 256 url,
257 content::Referrer(params->referrer, WebKit::WebReferrerPolicyDefault),
258 params->transition, extra_headers);
257 } else { 259 } else {
258 target_contents->controller().LoadURL( 260 target_contents->controller().LoadURL(
259 url, params->referrer, params->transition, extra_headers); 261 url,
262 content::Referrer(params->referrer, WebKit::WebReferrerPolicyDefault),
263 params->transition, extra_headers);
260 } 264 }
261 265
262 } 266 }
263 267
264 // This class makes sure the Browser object held in |params| is made visible 268 // This class makes sure the Browser object held in |params| is made visible
265 // by the time it goes out of scope, provided |params| wants it to be shown. 269 // by the time it goes out of scope, provided |params| wants it to be shown.
266 class ScopedBrowserDisplayer { 270 class ScopedBrowserDisplayer {
267 public: 271 public:
268 explicit ScopedBrowserDisplayer(browser::NavigateParams* params) 272 explicit ScopedBrowserDisplayer(browser::NavigateParams* params)
269 : params_(params) { 273 : params_(params) {
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 // chrome://settings. 638 // chrome://settings.
635 639
636 return !(url.scheme() == chrome::kChromeUIScheme && 640 return !(url.scheme() == chrome::kChromeUIScheme &&
637 (url.host() == chrome::kChromeUISettingsHost || 641 (url.host() == chrome::kChromeUISettingsHost ||
638 url.host() == chrome::kChromeUIExtensionsHost || 642 url.host() == chrome::kChromeUIExtensionsHost ||
639 url.host() == chrome::kChromeUIBookmarksHost || 643 url.host() == chrome::kChromeUIBookmarksHost ||
640 url.host() == chrome::kChromeUISyncPromoHost)); 644 url.host() == chrome::kChromeUISyncPromoHost));
641 } 645 }
642 646
643 } // namespace browser 647 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/cocoa/constrained_html_delegate_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698