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

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

Issue 579004: Pull latest googleurl to get various fixes (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 | « chrome/app/chrome_dll_main.cc ('k') | 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) 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 DISALLOW_COPY_AND_ASSIGN(SecurityState); 101 DISALLOW_COPY_AND_ASSIGN(SecurityState);
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-extension"); 111 RegisterWebSafeScheme(chrome::kExtensionScheme);
112 112
113 // We know about the following psuedo schemes and treat them specially. 113 // We know about the following psuedo schemes and treat them specially.
114 RegisterPseudoScheme(chrome::kAboutScheme); 114 RegisterPseudoScheme(chrome::kAboutScheme);
115 RegisterPseudoScheme(chrome::kJavaScriptScheme); 115 RegisterPseudoScheme(chrome::kJavaScriptScheme);
116 RegisterPseudoScheme(chrome::kViewSourceScheme); 116 RegisterPseudoScheme(chrome::kViewSourceScheme);
117 RegisterPseudoScheme(chrome::kPrintScheme); 117 RegisterPseudoScheme(chrome::kPrintScheme);
118 } 118 }
119 119
120 ChildProcessSecurityPolicy::~ChildProcessSecurityPolicy() { 120 ChildProcessSecurityPolicy::~ChildProcessSecurityPolicy() {
121 web_safe_schemes_.clear(); 121 web_safe_schemes_.clear();
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 370
371 bool ChildProcessSecurityPolicy::CanReadRawCookies(int renderer_id) { 371 bool ChildProcessSecurityPolicy::CanReadRawCookies(int renderer_id) {
372 AutoLock lock(lock_); 372 AutoLock lock(lock_);
373 373
374 SecurityStateMap::iterator state = security_state_.find(renderer_id); 374 SecurityStateMap::iterator state = security_state_.find(renderer_id);
375 if (state == security_state_.end()) 375 if (state == security_state_.end())
376 return false; 376 return false;
377 377
378 return state->second->can_read_raw_cookies(); 378 return state->second->can_read_raw_cookies();
379 } 379 }
OLDNEW
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | chrome/browser/dom_ui/chrome_url_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698