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

Side by Side Diff: chrome/browser/child_process_security_policy.cc

Issue 155067: Hookup Print HTML page to the DOM UI for Print Preview and Settings... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/dom_ui/chrome_url_data_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/child_process_security_policy.h" 5 #include "chrome/browser/child_process_security_policy.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/stl_util-inl.h" 9 #include "base/stl_util-inl.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 225
226 SecurityStateMap::iterator state = security_state_.find(renderer_id); 226 SecurityStateMap::iterator state = security_state_.find(renderer_id);
227 if (state == security_state_.end()) 227 if (state == security_state_.end())
228 return; 228 return;
229 229
230 state->second->GrantBindings(BindingsPolicy::DOM_UI); 230 state->second->GrantBindings(BindingsPolicy::DOM_UI);
231 231
232 // DOM UI bindings need the ability to request chrome: URLs. 232 // DOM UI bindings need the ability to request chrome: URLs.
233 state->second->GrantScheme(chrome::kChromeUIScheme); 233 state->second->GrantScheme(chrome::kChromeUIScheme);
234 234
235 // DOM UI bindings need the ability to request print: URLs.
236 state->second->GrantScheme(chrome::kPrintScheme);
237
235 // DOM UI pages can contain links to file:// URLs. 238 // DOM UI pages can contain links to file:// URLs.
236 state->second->GrantScheme(chrome::kFileScheme); 239 state->second->GrantScheme(chrome::kFileScheme);
237 } 240 }
238 241
239 void ChildProcessSecurityPolicy::GrantExtensionBindings(int renderer_id) { 242 void ChildProcessSecurityPolicy::GrantExtensionBindings(int renderer_id) {
240 AutoLock lock(lock_); 243 AutoLock lock(lock_);
241 244
242 SecurityStateMap::iterator state = security_state_.find(renderer_id); 245 SecurityStateMap::iterator state = security_state_.find(renderer_id);
243 if (state == security_state_.end()) 246 if (state == security_state_.end())
244 return; 247 return;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 314
312 bool ChildProcessSecurityPolicy::HasExtensionBindings(int renderer_id) { 315 bool ChildProcessSecurityPolicy::HasExtensionBindings(int renderer_id) {
313 AutoLock lock(lock_); 316 AutoLock lock(lock_);
314 317
315 SecurityStateMap::iterator state = security_state_.find(renderer_id); 318 SecurityStateMap::iterator state = security_state_.find(renderer_id);
316 if (state == security_state_.end()) 319 if (state == security_state_.end())
317 return false; 320 return false;
318 321
319 return state->second->has_extension_bindings(); 322 return state->second->has_extension_bindings();
320 } 323 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/dom_ui/chrome_url_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698