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

Side by Side Diff: third_party/WebKit/Source/modules/fetch/GlobalFetch.cpp

Issue 2727633006: DevTools: Rename InspectorInstrumentation:: namespace into probe:: (Closed)
Patch Set: 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
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 "modules/fetch/GlobalFetch.h" 5 #include "modules/fetch/GlobalFetch.h"
6 6
7 #include "core/frame/LocalDOMWindow.h" 7 #include "core/frame/LocalDOMWindow.h"
8 #include "core/frame/UseCounter.h" 8 #include "core/frame/UseCounter.h"
9 #include "core/inspector/InspectorInstrumentation.h" 9 #include "core/inspector/InspectorInstrumentation.h"
10 #include "core/workers/WorkerGlobalScope.h" 10 #include "core/workers/WorkerGlobalScope.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 return ScriptPromise(); 47 return ScriptPromise();
48 } 48 }
49 49
50 // "Let |r| be the associated request of the result of invoking the 50 // "Let |r| be the associated request of the result of invoking the
51 // initial value of Request as constructor with |input| and |init| as 51 // initial value of Request as constructor with |input| and |init| as
52 // arguments. If this throws an exception, reject |p| with it." 52 // arguments. If this throws an exception, reject |p| with it."
53 Request* r = Request::create(scriptState, input, init, exceptionState); 53 Request* r = Request::create(scriptState, input, init, exceptionState);
54 if (exceptionState.hadException()) 54 if (exceptionState.hadException())
55 return ScriptPromise(); 55 return ScriptPromise();
56 56
57 InspectorInstrumentation::willSendXMLHttpOrFetchNetworkRequest( 57 probe::willSendXMLHttpOrFetchNetworkRequest(executionContext, r->url());
58 executionContext, r->url());
59 return m_fetchManager->fetch(scriptState, r->passRequestData(scriptState)); 58 return m_fetchManager->fetch(scriptState, r->passRequestData(scriptState));
60 } 59 }
61 60
62 DEFINE_INLINE_VIRTUAL_TRACE() { 61 DEFINE_INLINE_VIRTUAL_TRACE() {
63 visitor->trace(m_fetchManager); 62 visitor->trace(m_fetchManager);
64 ScopedFetcher::trace(visitor); 63 ScopedFetcher::trace(visitor);
65 Supplement<T>::trace(visitor); 64 Supplement<T>::trace(visitor);
66 } 65 }
67 66
68 private: 67 private:
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 const RequestInfo& input, 110 const RequestInfo& input,
112 const Dictionary& init, 111 const Dictionary& init,
113 ExceptionState& exceptionState) { 112 ExceptionState& exceptionState) {
114 // Note that UseCounter doesn't work with SharedWorker or ServiceWorker. 113 // Note that UseCounter doesn't work with SharedWorker or ServiceWorker.
115 UseCounter::count(worker.getExecutionContext(), UseCounter::Fetch); 114 UseCounter::count(worker.getExecutionContext(), UseCounter::Fetch);
116 return ScopedFetcher::from(worker)->fetch(scriptState, input, init, 115 return ScopedFetcher::from(worker)->fetch(scriptState, input, init,
117 exceptionState); 116 exceptionState);
118 } 117 }
119 118
120 } // namespace blink 119 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698