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

Side by Side Diff: content/browser/frame_host/navigation_handle_impl.h

Issue 2413663003: Expose GlobalRequestID in NavigationHandle and ResourceRequestInfo. (Closed)
Patch Set: Use OnURLRequestDestroyed Created 4 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
7 7
8 #include "content/public/browser/navigation_handle.h" 8 #include "content/public/browser/navigation_handle.h"
9 9
10 #include <stddef.h> 10 #include <stddef.h>
11
12 #include <memory>
11 #include <string> 13 #include <string>
14 #include <utility>
15 #include <vector>
12 16
13 #include "base/callback.h" 17 #include "base/callback.h"
14 #include "base/macros.h" 18 #include "base/macros.h"
15 #include "base/memory/ref_counted.h" 19 #include "base/memory/ref_counted.h"
16 #include "base/memory/scoped_vector.h" 20 #include "base/memory/scoped_vector.h"
17 #include "content/browser/frame_host/frame_tree_node.h" 21 #include "content/browser/frame_host/frame_tree_node.h"
18 #include "content/browser/frame_host/render_frame_host_impl.h" 22 #include "content/browser/frame_host/render_frame_host_impl.h"
19 #include "content/common/content_export.h" 23 #include "content/common/content_export.h"
20 #include "content/public/browser/global_request_id.h" 24 #include "content/public/browser/global_request_id.h"
21 #include "content/public/browser/navigation_data.h" 25 #include "content/public/browser/navigation_data.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 bool new_method_is_post, 127 bool new_method_is_post,
124 const GURL& new_referrer_url, 128 const GURL& new_referrer_url,
125 bool new_is_external_protocol) override; 129 bool new_is_external_protocol) override;
126 NavigationThrottle::ThrottleCheckResult CallWillProcessResponseForTesting( 130 NavigationThrottle::ThrottleCheckResult CallWillProcessResponseForTesting(
127 RenderFrameHost* render_frame_host, 131 RenderFrameHost* render_frame_host,
128 const std::string& raw_response_header) override; 132 const std::string& raw_response_header) override;
129 void CallDidCommitNavigationForTesting(const GURL& url) override; 133 void CallDidCommitNavigationForTesting(const GURL& url) override;
130 bool WasStartedFromContextMenu() const override; 134 bool WasStartedFromContextMenu() const override;
131 const GURL& GetSearchableFormURL() override; 135 const GURL& GetSearchableFormURL() override;
132 const std::string& GetSearchableFormEncoding() override; 136 const std::string& GetSearchableFormEncoding() override;
137 const GlobalRequestID& GetGlobalRequestID() override;
133 138
134 NavigationData* GetNavigationData() override; 139 NavigationData* GetNavigationData() override;
135 140
136 // The NavigatorDelegate to notify/query for various navigation events. 141 // The NavigatorDelegate to notify/query for various navigation events.
137 // Normally this is the WebContents, except if this NavigationHandle was 142 // Normally this is the WebContents, except if this NavigationHandle was
138 // created during a navigation to an interstitial page. In this case it will 143 // created during a navigation to an interstitial page. In this case it will
139 // be the InterstitialPage itself. 144 // be the InterstitialPage itself.
140 // 145 //
141 // Note: due to the interstitial navigation case, all calls that can possibly 146 // Note: due to the interstitial navigation case, all calls that can possibly
142 // expose the NavigationHandle to code outside of content/ MUST go though the 147 // expose the NavigationHandle to code outside of content/ MUST go though the
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 265
261 // Called during commit. Takes ownership of the embedder's NavigationData 266 // Called during commit. Takes ownership of the embedder's NavigationData
262 // instance. This NavigationData may have been cloned prior to being added 267 // instance. This NavigationData may have been cloned prior to being added
263 // here. 268 // here.
264 void set_navigation_data(std::unique_ptr<NavigationData> navigation_data) { 269 void set_navigation_data(std::unique_ptr<NavigationData> navigation_data) {
265 navigation_data_ = std::move(navigation_data); 270 navigation_data_ = std::move(navigation_data);
266 } 271 }
267 272
268 SSLStatus ssl_status() { return ssl_status_; } 273 SSLStatus ssl_status() { return ssl_status_; }
269 274
270 // This is valid after the network response has started.
271 // TODO(clamy): See if this can be initialized earlier if needed by
272 // non-transfer code. There may be some issues in PlzNavigate, where
273 // WillStartRequest will be called before starting a request on the IO thread.
274 const GlobalRequestID& request_id() const {
275 DCHECK_GE(state_, WILL_PROCESS_RESPONSE);
276 return request_id_;
277 }
278
279 // Called when the navigation is transferred to a different renderer. 275 // Called when the navigation is transferred to a different renderer.
280 void Transfer(); 276 void Transfer();
281 277
282 NavigationUIData* navigation_ui_data() const { 278 NavigationUIData* navigation_ui_data() const {
283 return navigation_ui_data_.get(); 279 return navigation_ui_data_.get();
284 } 280 }
285 281
286 void set_searchable_form_url(const GURL& url) { searchable_form_url_ = url; } 282 void set_searchable_form_url(const GURL& url) { searchable_form_url_ = url; }
287 void set_searchable_form_encoding(const std::string& encoding) { 283 void set_searchable_form_encoding(const std::string& encoding) {
288 searchable_form_encoding_ = encoding; 284 searchable_form_encoding_ = encoding;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 std::string searchable_form_encoding_; 431 std::string searchable_form_encoding_;
436 432
437 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; 433 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_;
438 434
439 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); 435 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl);
440 }; 436 };
441 437
442 } // namespace content 438 } // namespace content
443 439
444 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ 440 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
OLDNEW
« no previous file with comments | « components/data_use_measurement/core/data_use_recorder.cc ('k') | content/browser/frame_host/navigation_handle_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698