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

Side by Side Diff: content/public/test/browser_test_utils.cc

Issue 2830353003: Tracing for NavigationHandle lifetime and state. (Closed)
Patch Set: Rebase. Created 3 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/public/test/browser_test_utils.h" 5 #include "content/public/test/browser_test_utils.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <tuple> 8 #include <tuple>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 class TestNavigationManagerThrottle : public NavigationThrottle { 340 class TestNavigationManagerThrottle : public NavigationThrottle {
341 public: 341 public:
342 TestNavigationManagerThrottle(NavigationHandle* handle, 342 TestNavigationManagerThrottle(NavigationHandle* handle,
343 base::Closure on_will_start_request_closure, 343 base::Closure on_will_start_request_closure,
344 base::Closure on_will_process_response_closure) 344 base::Closure on_will_process_response_closure)
345 : NavigationThrottle(handle), 345 : NavigationThrottle(handle),
346 on_will_start_request_closure_(on_will_start_request_closure), 346 on_will_start_request_closure_(on_will_start_request_closure),
347 on_will_process_response_closure_(on_will_process_response_closure) {} 347 on_will_process_response_closure_(on_will_process_response_closure) {}
348 ~TestNavigationManagerThrottle() override {} 348 ~TestNavigationManagerThrottle() override {}
349 349
350 const char* GetNameForLogging() override {
351 return "TestNavigationManagerThrottle";
352 }
353
350 private: 354 private:
351 // NavigationThrottle: 355 // NavigationThrottle:
352 NavigationThrottle::ThrottleCheckResult WillStartRequest() override { 356 NavigationThrottle::ThrottleCheckResult WillStartRequest() override {
353 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 357 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
354 on_will_start_request_closure_); 358 on_will_start_request_closure_);
355 return NavigationThrottle::DEFER; 359 return NavigationThrottle::DEFER;
356 } 360 }
357 361
358 NavigationThrottle::ThrottleCheckResult WillProcessResponse() override { 362 NavigationThrottle::ThrottleCheckResult WillProcessResponse() override {
359 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 363 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
(...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after
2027 bool user_gesture, 2031 bool user_gesture,
2028 bool last_unlocked_by_target, 2032 bool last_unlocked_by_target,
2029 bool privileged) { 2033 bool privileged) {
2030 IPC::IpcSecurityTestUtil::PwnMessageReceived( 2034 IPC::IpcSecurityTestUtil::PwnMessageReceived(
2031 process->GetChannel(), 2035 process->GetChannel(),
2032 ViewHostMsg_LockMouse(routing_id, user_gesture, last_unlocked_by_target, 2036 ViewHostMsg_LockMouse(routing_id, user_gesture, last_unlocked_by_target,
2033 privileged)); 2037 privileged));
2034 } 2038 }
2035 2039
2036 } // namespace content 2040 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/navigation_throttle.h ('k') | content/public/test/navigation_simulator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698