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

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

Issue 3282003: Support handling blob URL and resolve blob references in upload data.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 }; 102 };
103 103
104 ChildProcessSecurityPolicy::ChildProcessSecurityPolicy() { 104 ChildProcessSecurityPolicy::ChildProcessSecurityPolicy() {
105 // We know about these schemes and believe them to be safe. 105 // We know about these schemes and believe them to be safe.
106 RegisterWebSafeScheme(chrome::kHttpScheme); 106 RegisterWebSafeScheme(chrome::kHttpScheme);
107 RegisterWebSafeScheme(chrome::kHttpsScheme); 107 RegisterWebSafeScheme(chrome::kHttpsScheme);
108 RegisterWebSafeScheme(chrome::kFtpScheme); 108 RegisterWebSafeScheme(chrome::kFtpScheme);
109 RegisterWebSafeScheme(chrome::kDataScheme); 109 RegisterWebSafeScheme(chrome::kDataScheme);
110 RegisterWebSafeScheme("feed"); 110 RegisterWebSafeScheme("feed");
111 RegisterWebSafeScheme(chrome::kExtensionScheme); 111 RegisterWebSafeScheme(chrome::kExtensionScheme);
112 RegisterWebSafeScheme(chrome::kBlobScheme);
112 113
113 // We know about the following psuedo schemes and treat them specially. 114 // We know about the following psuedo schemes and treat them specially.
114 RegisterPseudoScheme(chrome::kAboutScheme); 115 RegisterPseudoScheme(chrome::kAboutScheme);
115 RegisterPseudoScheme(chrome::kJavaScriptScheme); 116 RegisterPseudoScheme(chrome::kJavaScriptScheme);
116 RegisterPseudoScheme(chrome::kViewSourceScheme); 117 RegisterPseudoScheme(chrome::kViewSourceScheme);
117 } 118 }
118 119
119 ChildProcessSecurityPolicy::~ChildProcessSecurityPolicy() { 120 ChildProcessSecurityPolicy::~ChildProcessSecurityPolicy() {
120 web_safe_schemes_.clear(); 121 web_safe_schemes_.clear();
121 pseudo_schemes_.clear(); 122 pseudo_schemes_.clear();
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 369
369 bool ChildProcessSecurityPolicy::CanReadRawCookies(int renderer_id) { 370 bool ChildProcessSecurityPolicy::CanReadRawCookies(int renderer_id) {
370 AutoLock lock(lock_); 371 AutoLock lock(lock_);
371 372
372 SecurityStateMap::iterator state = security_state_.find(renderer_id); 373 SecurityStateMap::iterator state = security_state_.find(renderer_id);
373 if (state == security_state_.end()) 374 if (state == security_state_.end())
374 return false; 375 return false;
375 376
376 return state->second->can_read_raw_cookies(); 377 return state->second->can_read_raw_cookies();
377 } 378 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698