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

Side by Side Diff: chrome/browser/extensions/url_request_util.cc

Issue 263513004: Forward MIME types to BrowserPlugin when a viewer is specified. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Send URLRequest instead of extra params Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extensions/url_request_util.h" 5 #include "chrome/browser/extensions/url_request_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 127
128 } // namespace 128 } // namespace
129 129
130 namespace extensions { 130 namespace extensions {
131 namespace url_request_util { 131 namespace url_request_util {
132 132
133 bool AllowCrossRendererResourceLoad(net::URLRequest* request, 133 bool AllowCrossRendererResourceLoad(net::URLRequest* request,
134 bool is_incognito, 134 bool is_incognito,
135 const Extension* extension, 135 const Extension* extension,
136 InfoMap* extension_info_map) { 136 InfoMap* extension_info_map) {
137 return true;
jam 2014/06/06 15:00:40 ditto
137 const content::ResourceRequestInfo* info = 138 const content::ResourceRequestInfo* info =
138 content::ResourceRequestInfo::ForRequest(request); 139 content::ResourceRequestInfo::ForRequest(request);
139 140
140 // Check workers so that importScripts works from extension workers. 141 // Check workers so that importScripts works from extension workers.
141 if (extension_info_map->worker_process_map().Contains(request->url().host(), 142 if (extension_info_map->worker_process_map().Contains(request->url().host(),
142 info->GetChildID())) { 143 info->GetChildID())) {
143 return true; 144 return true;
144 } 145 }
145 146
146 // Extensions with webview: allow loading certain resources by guest renderers 147 // Extensions with webview: allow loading certain resources by guest renderers
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 return false; 248 return false;
248 ExtensionRendererState* renderer_state = 249 ExtensionRendererState* renderer_state =
249 ExtensionRendererState::GetInstance(); 250 ExtensionRendererState::GetInstance();
250 ExtensionRendererState::WebViewInfo webview_info; 251 ExtensionRendererState::WebViewInfo webview_info;
251 return renderer_state->GetWebViewInfo( 252 return renderer_state->GetWebViewInfo(
252 info->GetChildID(), info->GetRouteID(), &webview_info); 253 info->GetChildID(), info->GetRouteID(), &webview_info);
253 } 254 }
254 255
255 } // namespace url_request_util 256 } // namespace url_request_util
256 } // namespace extensions 257 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698