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

Side by Side Diff: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h

Issue 1721813002: Adding DRP specfic UMA for FirstContentfulPaint (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing nits Created 4 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 (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 #ifndef CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
6 #define CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "chrome/browser/external_protocol/external_protocol_handler.h" 14 #include "chrome/browser/external_protocol/external_protocol_handler.h"
15 #include "content/public/browser/resource_dispatcher_host_delegate.h" 15 #include "content/public/browser/resource_dispatcher_host_delegate.h"
16 16
17 class DelayedResourceQueue; 17 class DelayedResourceQueue;
18 class DownloadRequestLimiter; 18 class DownloadRequestLimiter;
19 19
20 namespace content {
21 class ResourceContext;
22 }
23
20 namespace extensions { 24 namespace extensions {
21 class UserScriptListener; 25 class UserScriptListener;
22 } 26 }
23 27
28 namespace net {
29 class HostPortPair;
30 }
31
24 namespace safe_browsing { 32 namespace safe_browsing {
25 class SafeBrowsingService; 33 class SafeBrowsingService;
26 } 34 }
27 35
28 // Implements ResourceDispatcherHostDelegate. Currently used by the Prerender 36 // Implements ResourceDispatcherHostDelegate. Currently used by the Prerender
29 // system to abort requests and add to the load flags when a request begins. 37 // system to abort requests and add to the load flags when a request begins.
30 class ChromeResourceDispatcherHostDelegate 38 class ChromeResourceDispatcherHostDelegate
31 : public content::ResourceDispatcherHostDelegate { 39 : public content::ResourceDispatcherHostDelegate {
32 public: 40 public:
33 ChromeResourceDispatcherHostDelegate(); 41 ChromeResourceDispatcherHostDelegate();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 content::ResourceResponse* response, 86 content::ResourceResponse* response,
79 IPC::Sender* sender) override; 87 IPC::Sender* sender) override;
80 void OnRequestRedirected(const GURL& redirect_url, 88 void OnRequestRedirected(const GURL& redirect_url,
81 net::URLRequest* request, 89 net::URLRequest* request,
82 content::ResourceContext* resource_context, 90 content::ResourceContext* resource_context,
83 content::ResourceResponse* response) override; 91 content::ResourceResponse* response) override;
84 void RequestComplete(net::URLRequest* url_request) override; 92 void RequestComplete(net::URLRequest* url_request) override;
85 bool ShouldEnableLoFiMode( 93 bool ShouldEnableLoFiMode(
86 const net::URLRequest& url_request, 94 const net::URLRequest& url_request,
87 content::ResourceContext* resource_context) override; 95 content::ResourceContext* resource_context) override;
88 96
tbansal1 2016/03/08 22:14:43 Remove the line break since this method is also ov
RyanSturm 2016/03/10 00:37:58 Done.
97 bool UsedDataReductionProxy(
98 const net::HostPortPair& proxy_server,
99 content::ResourceContext* resource_context) override;
100
89 // Called on the UI thread. Allows switching out the 101 // Called on the UI thread. Allows switching out the
90 // ExternalProtocolHandler::Delegate for testing code. 102 // ExternalProtocolHandler::Delegate for testing code.
91 static void SetExternalProtocolHandlerDelegateForTesting( 103 static void SetExternalProtocolHandlerDelegateForTesting(
92 ExternalProtocolHandler::Delegate* delegate); 104 ExternalProtocolHandler::Delegate* delegate);
93 105
94 private: 106 private:
95 #if defined(ENABLE_EXTENSIONS) 107 #if defined(ENABLE_EXTENSIONS)
96 struct StreamTargetInfo { 108 struct StreamTargetInfo {
97 std::string extension_id; 109 std::string extension_id;
98 std::string view_id; 110 std::string view_id;
(...skipping 10 matching lines...) Expand all
109 scoped_refptr<safe_browsing::SafeBrowsingService> safe_browsing_; 121 scoped_refptr<safe_browsing::SafeBrowsingService> safe_browsing_;
110 #if defined(ENABLE_EXTENSIONS) 122 #if defined(ENABLE_EXTENSIONS)
111 scoped_refptr<extensions::UserScriptListener> user_script_listener_; 123 scoped_refptr<extensions::UserScriptListener> user_script_listener_;
112 std::map<net::URLRequest*, StreamTargetInfo> stream_target_info_; 124 std::map<net::URLRequest*, StreamTargetInfo> stream_target_info_;
113 #endif 125 #endif
114 126
115 DISALLOW_COPY_AND_ASSIGN(ChromeResourceDispatcherHostDelegate); 127 DISALLOW_COPY_AND_ASSIGN(ChromeResourceDispatcherHostDelegate);
116 }; 128 };
117 129
118 #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE _H_ 130 #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698