OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/frame_host/render_frame_message_filter.h" | 5 #include "content/browser/frame_host/render_frame_message_filter.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/alias.h" | 8 #include "base/debug/alias.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "content/common/view_messages.h" | 23 #include "content/common/view_messages.h" |
24 #include "content/public/browser/browser_context.h" | 24 #include "content/public/browser/browser_context.h" |
25 #include "content/public/browser/browser_thread.h" | 25 #include "content/public/browser/browser_thread.h" |
26 #include "content/public/browser/download_manager.h" | 26 #include "content/public/browser/download_manager.h" |
27 #include "content/public/browser/download_url_parameters.h" | 27 #include "content/public/browser/download_url_parameters.h" |
28 #include "content/public/common/content_constants.h" | 28 #include "content/public/common/content_constants.h" |
29 #include "gpu/GLES2/gl2extchromium.h" | 29 #include "gpu/GLES2/gl2extchromium.h" |
30 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 30 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
31 #include "net/cookies/cookie_options.h" | 31 #include "net/cookies/cookie_options.h" |
32 #include "net/cookies/cookie_store.h" | 32 #include "net/cookies/cookie_store.h" |
| 33 #include "net/traffic_annotation/network_traffic_annotation.h" |
33 #include "net/url_request/url_request_context.h" | 34 #include "net/url_request/url_request_context.h" |
34 #include "net/url_request/url_request_context_getter.h" | 35 #include "net/url_request/url_request_context_getter.h" |
35 #include "ppapi/features/features.h" | 36 #include "ppapi/features/features.h" |
36 #include "storage/browser/blob/blob_storage_context.h" | 37 #include "storage/browser/blob/blob_storage_context.h" |
37 #include "url/gurl.h" | 38 #include "url/gurl.h" |
38 #include "url/origin.h" | 39 #include "url/origin.h" |
39 | 40 |
40 #if !defined(OS_MACOSX) | 41 #if !defined(OS_MACOSX) |
41 #include "third_party/khronos/GLES2/gl2.h" | 42 #include "third_party/khronos/GLES2/gl2.h" |
42 #include "third_party/khronos/GLES2/gl2ext.h" | 43 #include "third_party/khronos/GLES2/gl2ext.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 83 |
83 RenderProcessHost* render_process_host = | 84 RenderProcessHost* render_process_host = |
84 RenderProcessHost::FromID(parameters->render_process_host_id()); | 85 RenderProcessHost::FromID(parameters->render_process_host_id()); |
85 if (!render_process_host) | 86 if (!render_process_host) |
86 return; | 87 return; |
87 | 88 |
88 BrowserContext* browser_context = render_process_host->GetBrowserContext(); | 89 BrowserContext* browser_context = render_process_host->GetBrowserContext(); |
89 DownloadManager* download_manager = | 90 DownloadManager* download_manager = |
90 BrowserContext::GetDownloadManager(browser_context); | 91 BrowserContext::GetDownloadManager(browser_context); |
91 RecordDownloadSource(INITIATED_BY_RENDERER); | 92 RecordDownloadSource(INITIATED_BY_RENDERER); |
92 download_manager->DownloadUrl(std::move(parameters)); | 93 download_manager->DownloadUrl(std::move(parameters), |
| 94 NO_TRAFFIC_ANNOTATION_YET); |
93 } | 95 } |
94 | 96 |
95 // Common functionality for converting a sync renderer message to a callback | 97 // Common functionality for converting a sync renderer message to a callback |
96 // function in the browser. Derive from this, create it on the heap when | 98 // function in the browser. Derive from this, create it on the heap when |
97 // issuing your callback. When done, write your reply parameters into | 99 // issuing your callback. When done, write your reply parameters into |
98 // reply_msg(), and then call SendReplyAndDeleteThis(). | 100 // reply_msg(), and then call SendReplyAndDeleteThis(). |
99 class RenderMessageCompletionCallback { | 101 class RenderMessageCompletionCallback { |
100 public: | 102 public: |
101 RenderMessageCompletionCallback(RenderFrameMessageFilter* filter, | 103 RenderMessageCompletionCallback(RenderFrameMessageFilter* filter, |
102 IPC::Message* reply_msg) | 104 IPC::Message* reply_msg) |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 net::URLRequestContext* context = | 596 net::URLRequestContext* context = |
595 GetContentClient()->browser()->OverrideRequestContextForURL( | 597 GetContentClient()->browser()->OverrideRequestContextForURL( |
596 url, resource_context_); | 598 url, resource_context_); |
597 if (!context) | 599 if (!context) |
598 context = request_context_->GetURLRequestContext(); | 600 context = request_context_->GetURLRequestContext(); |
599 | 601 |
600 return context; | 602 return context; |
601 } | 603 } |
602 | 604 |
603 } // namespace content | 605 } // namespace content |
OLD | NEW |