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

Side by Side Diff: content/test/test_navigation_url_loader_delegate.h

Issue 1721813002: Adding DRP specfic UMA for FirstContentfulPaint (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase, Tests, Ready for Review Created 4 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_TEST_TEST_NAVIGATION_URL_LOADER_DELEGATE_H_ 5 #ifndef CONTENT_TEST_TEST_NAVIGATION_URL_LOADER_DELEGATE_H_
6 #define CONTENT_TEST_TEST_NAVIGATION_URL_LOADER_DELEGATE_H_ 6 #define CONTENT_TEST_TEST_NAVIGATION_URL_LOADER_DELEGATE_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
11 #include "base/time/time.h" 13 #include "base/time/time.h"
12 #include "content/browser/loader/navigation_url_loader_delegate.h" 14 #include "content/browser/loader/navigation_url_loader_delegate.h"
13 #include "net/url_request/redirect_info.h" 15 #include "net/url_request/redirect_info.h"
14 16
15 namespace base { 17 namespace base {
16 class RunLoop; 18 class RunLoop;
17 } 19 }
(...skipping 28 matching lines...) Expand all
46 void WaitForResponseStarted(); 48 void WaitForResponseStarted();
47 void WaitForRequestFailed(); 49 void WaitForRequestFailed();
48 void WaitForRequestStarted(); 50 void WaitForRequestStarted();
49 51
50 void ReleaseBody(); 52 void ReleaseBody();
51 53
52 // NavigationURLLoaderDelegate implementation. 54 // NavigationURLLoaderDelegate implementation.
53 void OnRequestRedirected( 55 void OnRequestRedirected(
54 const net::RedirectInfo& redirect_info, 56 const net::RedirectInfo& redirect_info,
55 const scoped_refptr<ResourceResponse>& response) override; 57 const scoped_refptr<ResourceResponse>& response) override;
56 void OnResponseStarted(const scoped_refptr<ResourceResponse>& response, 58 void OnResponseStarted(
57 scoped_ptr<StreamHandle> body) override; 59 const scoped_refptr<ResourceResponse>& response,
60 scoped_ptr<StreamHandle> body,
61 std::unique_ptr<NavigationData> navigation_data) override;
58 void OnRequestFailed(bool in_cache, int net_error) override; 62 void OnRequestFailed(bool in_cache, int net_error) override;
59 void OnRequestStarted(base::TimeTicks timestamp) override; 63 void OnRequestStarted(base::TimeTicks timestamp) override;
60 64
61 private: 65 private:
62 net::RedirectInfo redirect_info_; 66 net::RedirectInfo redirect_info_;
63 scoped_refptr<ResourceResponse> redirect_response_; 67 scoped_refptr<ResourceResponse> redirect_response_;
64 scoped_refptr<ResourceResponse> response_; 68 scoped_refptr<ResourceResponse> response_;
65 scoped_ptr<StreamHandle> body_; 69 scoped_ptr<StreamHandle> body_;
66 int net_error_; 70 int net_error_;
67 int on_request_handled_counter_; 71 int on_request_handled_counter_;
68 72
69 scoped_ptr<base::RunLoop> request_redirected_; 73 scoped_ptr<base::RunLoop> request_redirected_;
70 scoped_ptr<base::RunLoop> response_started_; 74 scoped_ptr<base::RunLoop> response_started_;
71 scoped_ptr<base::RunLoop> request_failed_; 75 scoped_ptr<base::RunLoop> request_failed_;
72 scoped_ptr<base::RunLoop> request_started_; 76 scoped_ptr<base::RunLoop> request_started_;
73 77
74 DISALLOW_COPY_AND_ASSIGN(TestNavigationURLLoaderDelegate); 78 DISALLOW_COPY_AND_ASSIGN(TestNavigationURLLoaderDelegate);
75 }; 79 };
76 80
77 } // namespace content 81 } // namespace content
78 82
79 #endif // CONTENT_TEST_TEST_NAVIGATION_URL_LOADER_DELEGATE_H 83 #endif // CONTENT_TEST_TEST_NAVIGATION_URL_LOADER_DELEGATE_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698