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

Side by Side Diff: content/browser/frame_host/navigator_impl.cc

Issue 1755363003: Revert of Mustash: Move GURL ParamTraits to url/ipc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/frame_host/navigator_impl.h" 5 #include "content/browser/frame_host/navigator_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 24 matching lines...) Expand all
35 #include "content/public/browser/render_view_host.h" 35 #include "content/public/browser/render_view_host.h"
36 #include "content/public/browser/stream_handle.h" 36 #include "content/public/browser/stream_handle.h"
37 #include "content/public/browser/user_metrics.h" 37 #include "content/public/browser/user_metrics.h"
38 #include "content/public/common/bindings_policy.h" 38 #include "content/public/common/bindings_policy.h"
39 #include "content/public/common/browser_side_navigation_policy.h" 39 #include "content/public/common/browser_side_navigation_policy.h"
40 #include "content/public/common/content_client.h" 40 #include "content/public/common/content_client.h"
41 #include "content/public/common/content_constants.h" 41 #include "content/public/common/content_constants.h"
42 #include "content/public/common/resource_response.h" 42 #include "content/public/common/resource_response.h"
43 #include "content/public/common/url_constants.h" 43 #include "content/public/common/url_constants.h"
44 #include "net/base/net_errors.h" 44 #include "net/base/net_errors.h"
45 #include "url/url_constants.h"
46 45
47 namespace content { 46 namespace content {
48 47
49 namespace { 48 namespace {
50 49
51 FrameMsg_Navigate_Type::Value GetNavigationType( 50 FrameMsg_Navigate_Type::Value GetNavigationType(
52 BrowserContext* browser_context, const NavigationEntryImpl& entry, 51 BrowserContext* browser_context, const NavigationEntryImpl& entry,
53 NavigationController::ReloadType reload_type) { 52 NavigationController::ReloadType reload_type) {
54 switch (reload_type) { 53 switch (reload_type) {
55 case NavigationControllerImpl::RELOAD: 54 case NavigationControllerImpl::RELOAD:
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 283
285 // Don't attempt to navigate to non-empty invalid URLs. 284 // Don't attempt to navigate to non-empty invalid URLs.
286 if (!dest_url.is_valid() && !dest_url.is_empty()) { 285 if (!dest_url.is_valid() && !dest_url.is_empty()) {
287 LOG(WARNING) << "Refusing to load invalid URL: " 286 LOG(WARNING) << "Refusing to load invalid URL: "
288 << dest_url.possibly_invalid_spec(); 287 << dest_url.possibly_invalid_spec();
289 return false; 288 return false;
290 } 289 }
291 290
292 // The renderer will reject IPC messages with URLs longer than 291 // The renderer will reject IPC messages with URLs longer than
293 // this limit, so don't attempt to navigate with a longer URL. 292 // this limit, so don't attempt to navigate with a longer URL.
294 if (dest_url.spec().size() > url::kMaxURLChars) { 293 if (dest_url.spec().size() > kMaxURLChars) {
295 LOG(WARNING) << "Refusing to load URL as it exceeds " << url::kMaxURLChars 294 LOG(WARNING) << "Refusing to load URL as it exceeds " << kMaxURLChars
296 << " characters."; 295 << " characters.";
297 return false; 296 return false;
298 } 297 }
299 298
300 // This will be used to set the Navigation Timing API navigationStart 299 // This will be used to set the Navigation Timing API navigationStart
301 // parameter for browser navigations in new tabs (intents, tabs opened through 300 // parameter for browser navigations in new tabs (intents, tabs opened through
302 // "Open link in new tab"). We need to keep it above RFHM::Navigate() call to 301 // "Open link in new tab"). We need to keep it above RFHM::Navigate() call to
303 // capture the time needed for the RenderFrameHost initialization. 302 // capture the time needed for the RenderFrameHost initialization.
304 base::TimeTicks navigation_start = base::TimeTicks::Now(); 303 base::TimeTicks navigation_start = base::TimeTicks::Now();
305 TRACE_EVENT_INSTANT_WITH_TIMESTAMP0( 304 TRACE_EVENT_INSTANT_WITH_TIMESTAMP0(
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 entry->set_should_replace_entry(pending_entry->should_replace_entry()); 1108 entry->set_should_replace_entry(pending_entry->should_replace_entry());
1110 entry->SetRedirectChain(pending_entry->GetRedirectChain()); 1109 entry->SetRedirectChain(pending_entry->GetRedirectChain());
1111 } 1110 }
1112 controller_->SetPendingEntry(std::move(entry)); 1111 controller_->SetPendingEntry(std::move(entry));
1113 if (delegate_) 1112 if (delegate_)
1114 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); 1113 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL);
1115 } 1114 }
1116 } 1115 }
1117 1116
1118 } // namespace content 1117 } // namespace content
OLDNEW
« no previous file with comments | « components/translate/content/common/translate_messages.h ('k') | content/browser/web_contents/web_contents_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698