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

Side by Side Diff: third_party/WebKit/Source/core/frame/History.cpp

Issue 2724943003: Add a trace event in FrameLoader::updateForSameDocumentNavigation. (Closed)
Patch Set: sync Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/Location.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 18 matching lines...) Expand all
29 #include "bindings/core/v8/ScriptState.h" 29 #include "bindings/core/v8/ScriptState.h"
30 #include "core/dom/Document.h" 30 #include "core/dom/Document.h"
31 #include "core/frame/LocalFrame.h" 31 #include "core/frame/LocalFrame.h"
32 #include "core/frame/LocalFrameClient.h" 32 #include "core/frame/LocalFrameClient.h"
33 #include "core/loader/DocumentLoader.h" 33 #include "core/loader/DocumentLoader.h"
34 #include "core/loader/FrameLoader.h" 34 #include "core/loader/FrameLoader.h"
35 #include "core/loader/HistoryItem.h" 35 #include "core/loader/HistoryItem.h"
36 #include "core/loader/NavigationScheduler.h" 36 #include "core/loader/NavigationScheduler.h"
37 #include "core/page/Page.h" 37 #include "core/page/Page.h"
38 #include "platform/RuntimeEnabledFeatures.h" 38 #include "platform/RuntimeEnabledFeatures.h"
39 #include "platform/instrumentation/tracing/TraceEvent.h"
40 #include "platform/weborigin/KURL.h" 39 #include "platform/weborigin/KURL.h"
41 #include "platform/weborigin/SecurityOrigin.h" 40 #include "platform/weborigin/SecurityOrigin.h"
42 #include "wtf/text/StringView.h" 41 #include "wtf/text/StringView.h"
43 42
44 namespace blink { 43 namespace blink {
45 44
46 namespace { 45 namespace {
47 46
48 bool equalIgnoringPathQueryAndFragment(const KURL& a, const KURL& b) { 47 bool equalIgnoringPathQueryAndFragment(const KURL& a, const KURL& b) {
49 return StringView(a.getString(), 0, a.pathStart()) == 48 return StringView(a.getString(), 0, a.pathStart()) ==
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 ? FrameLoadTypeReloadMainResource 158 ? FrameLoadTypeReloadMainResource
160 : FrameLoadTypeReload; 159 : FrameLoadTypeReload;
161 frame()->reload(reloadType, ClientRedirectPolicy::ClientRedirect); 160 frame()->reload(reloadType, ClientRedirectPolicy::ClientRedirect);
162 } 161 }
163 } 162 }
164 163
165 void History::pushState(PassRefPtr<SerializedScriptValue> data, 164 void History::pushState(PassRefPtr<SerializedScriptValue> data,
166 const String& title, 165 const String& title,
167 const String& url, 166 const String& url,
168 ExceptionState& exceptionState) { 167 ExceptionState& exceptionState) {
169 TRACE_EVENT0("blink", "History::pushState");
170 stateObjectAdded(std::move(data), title, url, scrollRestorationInternal(), 168 stateObjectAdded(std::move(data), title, url, scrollRestorationInternal(),
171 FrameLoadTypeStandard, exceptionState); 169 FrameLoadTypeStandard, exceptionState);
172 } 170 }
173 171
174 KURL History::urlForState(const String& urlString) { 172 KURL History::urlForState(const String& urlString) {
175 Document* document = frame()->document(); 173 Document* document = frame()->document();
176 174
177 if (urlString.isNull()) 175 if (urlString.isNull())
178 return document->url(); 176 return document->url();
179 if (urlString.isEmpty()) 177 if (urlString.isEmpty())
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 frame()->document()->url().elidedString() + "'."); 229 frame()->document()->url().elidedString() + "'.");
232 return; 230 return;
233 } 231 }
234 232
235 frame()->loader().updateForSameDocumentNavigation( 233 frame()->loader().updateForSameDocumentNavigation(
236 fullURL, SameDocumentNavigationHistoryApi, std::move(data), 234 fullURL, SameDocumentNavigationHistoryApi, std::move(data),
237 restorationType, type, frame()->document()); 235 restorationType, type, frame()->document());
238 } 236 }
239 237
240 } // namespace blink 238 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/Location.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698