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

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

Issue 666973003: [ServiceWorker] Don't send the UMA related headers to the ServiceWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use const ref Created 6 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 (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 "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate. h" 5 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate. h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 24 matching lines...) Expand all
35 #include "components/content_settings/core/browser/host_content_settings_map.h" 35 #include "components/content_settings/core/browser/host_content_settings_map.h"
36 #include "components/google/core/browser/google_util.h" 36 #include "components/google/core/browser/google_util.h"
37 #include "components/variations/net/variations_http_header_provider.h" 37 #include "components/variations/net/variations_http_header_provider.h"
38 #include "content/public/browser/browser_thread.h" 38 #include "content/public/browser/browser_thread.h"
39 #include "content/public/browser/notification_service.h" 39 #include "content/public/browser/notification_service.h"
40 #include "content/public/browser/render_process_host.h" 40 #include "content/public/browser/render_process_host.h"
41 #include "content/public/browser/render_view_host.h" 41 #include "content/public/browser/render_view_host.h"
42 #include "content/public/browser/resource_context.h" 42 #include "content/public/browser/resource_context.h"
43 #include "content/public/browser/resource_dispatcher_host.h" 43 #include "content/public/browser/resource_dispatcher_host.h"
44 #include "content/public/browser/resource_request_info.h" 44 #include "content/public/browser/resource_request_info.h"
45 #include "content/public/browser/service_worker_context.h"
45 #include "content/public/browser/stream_info.h" 46 #include "content/public/browser/stream_info.h"
46 #include "content/public/browser/web_contents.h" 47 #include "content/public/browser/web_contents.h"
47 #include "content/public/common/resource_response.h" 48 #include "content/public/common/resource_response.h"
48 #include "net/base/load_flags.h" 49 #include "net/base/load_flags.h"
49 #include "net/base/load_timing_info.h" 50 #include "net/base/load_timing_info.h"
50 #include "net/base/request_priority.h" 51 #include "net/base/request_priority.h"
51 #include "net/http/http_response_headers.h" 52 #include "net/http/http_response_headers.h"
52 #include "net/url_request/url_request.h" 53 #include "net/url_request/url_request.h"
53 54
54 #if !defined(DISABLE_NACL) 55 #if !defined(DISABLE_NACL)
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } // namespace 265 } // namespace
265 266
266 ChromeResourceDispatcherHostDelegate::ChromeResourceDispatcherHostDelegate( 267 ChromeResourceDispatcherHostDelegate::ChromeResourceDispatcherHostDelegate(
267 prerender::PrerenderTracker* prerender_tracker) 268 prerender::PrerenderTracker* prerender_tracker)
268 : download_request_limiter_(g_browser_process->download_request_limiter()), 269 : download_request_limiter_(g_browser_process->download_request_limiter()),
269 safe_browsing_(g_browser_process->safe_browsing_service()), 270 safe_browsing_(g_browser_process->safe_browsing_service()),
270 #if defined(ENABLE_EXTENSIONS) 271 #if defined(ENABLE_EXTENSIONS)
271 user_script_listener_(new extensions::UserScriptListener()), 272 user_script_listener_(new extensions::UserScriptListener()),
272 #endif 273 #endif
273 prerender_tracker_(prerender_tracker) { 274 prerender_tracker_(prerender_tracker) {
275 content::ServiceWorkerContext::AddExcludedHeadersForFetchEvent(
Lei Zhang 2014/10/29 21:47:21 This looks like essentially a static function call
horo 2014/10/30 07:54:34 I think ChromeResourceDispatcherHostDelegate is cr
Lei Zhang 2014/10/30 08:05:17 In that case, please as a chrome/browser/io_thread
276 variations::VariationsHttpHeaderProvider::GetInstance()
277 ->GetVariationHeaderNames());
274 } 278 }
275 279
276 ChromeResourceDispatcherHostDelegate::~ChromeResourceDispatcherHostDelegate() { 280 ChromeResourceDispatcherHostDelegate::~ChromeResourceDispatcherHostDelegate() {
277 #if defined(ENABLE_EXTENSIONS) 281 #if defined(ENABLE_EXTENSIONS)
278 CHECK(stream_target_info_.empty()); 282 CHECK(stream_target_info_.empty());
279 #endif 283 #endif
280 } 284 }
281 285
282 bool ChromeResourceDispatcherHostDelegate::ShouldBeginRequest( 286 bool ChromeResourceDispatcherHostDelegate::ShouldBeginRequest(
283 const std::string& method, 287 const std::string& method,
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 url_request->GetTotalReceivedBytes())); 758 url_request->GetTotalReceivedBytes()));
755 } 759 }
756 } 760 }
757 761
758 // static 762 // static
759 void ChromeResourceDispatcherHostDelegate:: 763 void ChromeResourceDispatcherHostDelegate::
760 SetExternalProtocolHandlerDelegateForTesting( 764 SetExternalProtocolHandlerDelegateForTesting(
761 ExternalProtocolHandler::Delegate* delegate) { 765 ExternalProtocolHandler::Delegate* delegate) {
762 g_external_protocol_handler_delegate = delegate; 766 g_external_protocol_handler_delegate = delegate;
763 } 767 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698