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

Side by Side Diff: content/common/navigation_params.cc

Issue 2686853004: Move IsAboutBlank from url_utils to GURL (Closed)
Patch Set: Addressed nit Created 3 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
« no previous file with comments | « content/browser/child_process_security_policy_impl.cc ('k') | url/gurl.h » ('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 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 "content/common/navigation_params.h" 5 #include "content/common/navigation_params.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "content/common/service_worker/service_worker_types.h" 9 #include "content/common/service_worker/service_worker_types.h"
10 #include "content/public/common/appcache_info.h" 10 #include "content/public/common/appcache_info.h"
11 #include "content/public/common/browser_side_navigation_policy.h" 11 #include "content/public/common/browser_side_navigation_policy.h"
12 #include "content/public/common/url_constants.h" 12 #include "content/public/common/url_constants.h"
13 #include "url/gurl.h" 13 #include "url/gurl.h"
14 #include "url/url_constants.h" 14 #include "url/url_constants.h"
15 #include "url/url_util.h"
16 15
17 namespace content { 16 namespace content {
18 17
19 // PlzNavigate 18 // PlzNavigate
20 bool ShouldMakeNetworkRequestForURL(const GURL& url) { 19 bool ShouldMakeNetworkRequestForURL(const GURL& url) {
21 CHECK(IsBrowserSideNavigationEnabled()); 20 CHECK(IsBrowserSideNavigationEnabled());
22 21
23 // Javascript URLs, about:blank, srcdoc should not send a request 22 // Javascript URLs, about:blank, srcdoc should not send a request
24 // to the network stack. 23 // to the network stack.
25 return !url::IsAboutBlank(url) && !url.SchemeIs(url::kJavaScriptScheme) && 24 return !url.IsAboutBlank() && !url.SchemeIs(url::kJavaScriptScheme) &&
26 !url.is_empty() && !url.SchemeIs(url::kContentIDScheme) && 25 !url.is_empty() && !url.SchemeIs(url::kContentIDScheme) &&
27 url != content::kAboutSrcDocURL; 26 url != content::kAboutSrcDocURL;
28 } 27 }
29 28
30 CommonNavigationParams::CommonNavigationParams() 29 CommonNavigationParams::CommonNavigationParams()
31 : transition(ui::PAGE_TRANSITION_LINK), 30 : transition(ui::PAGE_TRANSITION_LINK),
32 navigation_type(FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT), 31 navigation_type(FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT),
33 allow_download(true), 32 allow_download(true),
34 should_replace_current_entry(false), 33 should_replace_current_entry(false),
35 report_type(FrameMsg_UILoadMetricsReportType::NO_REPORT), 34 report_type(FrameMsg_UILoadMetricsReportType::NO_REPORT),
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 const RequestNavigationParams& request_params) 193 const RequestNavigationParams& request_params)
195 : common_params(common_params), 194 : common_params(common_params),
196 start_params(start_params), 195 start_params(start_params),
197 request_params(request_params) { 196 request_params(request_params) {
198 } 197 }
199 198
200 NavigationParams::~NavigationParams() { 199 NavigationParams::~NavigationParams() {
201 } 200 }
202 201
203 } // namespace content 202 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/child_process_security_policy_impl.cc ('k') | url/gurl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698