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

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

Issue 3324009: Work in progress implementation of Icon URI scheme. (Closed) Base URL: git://git.chromium.org/chromium.git
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
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::kIconURLScheme);
112 RegisterWebSafeScheme(chrome::kBlobScheme); 113 RegisterWebSafeScheme(chrome::kBlobScheme);
113 114
114 // We know about the following psuedo schemes and treat them specially. 115 // We know about the following psuedo schemes and treat them specially.
115 RegisterPseudoScheme(chrome::kAboutScheme); 116 RegisterPseudoScheme(chrome::kAboutScheme);
116 RegisterPseudoScheme(chrome::kJavaScriptScheme); 117 RegisterPseudoScheme(chrome::kJavaScriptScheme);
117 RegisterPseudoScheme(chrome::kViewSourceScheme); 118 RegisterPseudoScheme(chrome::kViewSourceScheme);
118 } 119 }
119 120
120 ChildProcessSecurityPolicy::~ChildProcessSecurityPolicy() { 121 ChildProcessSecurityPolicy::~ChildProcessSecurityPolicy() {
121 web_safe_schemes_.clear(); 122 web_safe_schemes_.clear();
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 370
370 bool ChildProcessSecurityPolicy::CanReadRawCookies(int renderer_id) { 371 bool ChildProcessSecurityPolicy::CanReadRawCookies(int renderer_id) {
371 AutoLock lock(lock_); 372 AutoLock lock(lock_);
372 373
373 SecurityStateMap::iterator state = security_state_.find(renderer_id); 374 SecurityStateMap::iterator state = security_state_.find(renderer_id);
374 if (state == security_state_.end()) 375 if (state == security_state_.end())
375 return false; 376 return false;
376 377
377 return state->second->can_read_raw_cookies(); 378 return state->second->can_read_raw_cookies();
378 } 379 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698