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

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

Issue 2745033002: Fix LoadDataWithBaseUrlTest#testloadDataWithBaseUrlCallsOnPageStarted with PlzNavigate. (Closed)
Patch Set: fix unittest 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 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>
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 bool new_is_external_protocol) override; 155 bool new_is_external_protocol) override;
156 NavigationThrottle::ThrottleCheckResult CallWillProcessResponseForTesting( 156 NavigationThrottle::ThrottleCheckResult CallWillProcessResponseForTesting(
157 RenderFrameHost* render_frame_host, 157 RenderFrameHost* render_frame_host,
158 const std::string& raw_response_header) override; 158 const std::string& raw_response_header) override;
159 void CallDidCommitNavigationForTesting(const GURL& url) override; 159 void CallDidCommitNavigationForTesting(const GURL& url) override;
160 bool WasStartedFromContextMenu() const override; 160 bool WasStartedFromContextMenu() const override;
161 const GURL& GetSearchableFormURL() override; 161 const GURL& GetSearchableFormURL() override;
162 const std::string& GetSearchableFormEncoding() override; 162 const std::string& GetSearchableFormEncoding() override;
163 ReloadType GetReloadType() override; 163 ReloadType GetReloadType() override;
164 RestoreType GetRestoreType() override; 164 RestoreType GetRestoreType() override;
165 const GURL& GetBaseURLForDataURL() override;
165 const GlobalRequestID& GetGlobalRequestID() override; 166 const GlobalRequestID& GetGlobalRequestID() override;
166 167
167 NavigationData* GetNavigationData() override; 168 NavigationData* GetNavigationData() override;
168 169
169 // Used in tests. 170 // Used in tests.
170 State state_for_testing() const { return state_; } 171 State state_for_testing() const { return state_; }
171 172
172 // The NavigatorDelegate to notify/query for various navigation events. 173 // The NavigatorDelegate to notify/query for various navigation events.
173 // Normally this is the WebContents, except if this NavigationHandle was 174 // Normally this is the WebContents, except if this NavigationHandle was
174 // created during a navigation to an interstitial page. In this case it will 175 // created during a navigation to an interstitial page. In this case it will
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 void set_response_headers_for_testing( 345 void set_response_headers_for_testing(
345 scoped_refptr<net::HttpResponseHeaders> response_headers) { 346 scoped_refptr<net::HttpResponseHeaders> response_headers) {
346 response_headers_ = response_headers; 347 response_headers_ = response_headers;
347 } 348 }
348 349
349 void set_complete_callback_for_testing( 350 void set_complete_callback_for_testing(
350 const ThrottleChecksFinishedCallback& callback) { 351 const ThrottleChecksFinishedCallback& callback) {
351 complete_callback_for_testing_ = callback; 352 complete_callback_for_testing_ = callback;
352 } 353 }
353 354
355 void set_base_url_for_data_url(const GURL& url) {
356 base_url_for_data_url_ = url;
357 }
358
354 private: 359 private:
355 friend class NavigationHandleImplTest; 360 friend class NavigationHandleImplTest;
356 361
357 NavigationHandleImpl(const GURL& url, 362 NavigationHandleImpl(const GURL& url,
358 const std::vector<GURL>& redirect_chain, 363 const std::vector<GURL>& redirect_chain,
359 FrameTreeNode* frame_tree_node, 364 FrameTreeNode* frame_tree_node,
360 bool is_renderer_initiated, 365 bool is_renderer_initiated,
361 bool is_same_page, 366 bool is_same_page,
362 const base::TimeTicks& navigation_start, 367 const base::TimeTicks& navigation_start,
363 int pending_nav_entry_id, 368 int pending_nav_entry_id,
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 ReloadType reload_type_; 510 ReloadType reload_type_;
506 511
507 // Stores the restore type, or NONE it it's not a restore. 512 // Stores the restore type, or NONE it it's not a restore.
508 RestoreType restore_type_; 513 RestoreType restore_type_;
509 514
510 GURL searchable_form_url_; 515 GURL searchable_form_url_;
511 std::string searchable_form_encoding_; 516 std::string searchable_form_encoding_;
512 517
513 GURL previous_url_; 518 GURL previous_url_;
514 GURL base_url_; 519 GURL base_url_;
520 GURL base_url_for_data_url_;
515 net::HostPortPair socket_address_; 521 net::HostPortPair socket_address_;
516 NavigationType navigation_type_; 522 NavigationType navigation_type_;
517 523
518 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; 524 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_;
519 525
520 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); 526 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl);
521 }; 527 };
522 528
523 } // namespace content 529 } // namespace content
524 530
525 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ 531 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
OLDNEW
« no previous file with comments | « components/navigation_interception/navigation_params_android.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