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

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

Issue 6804032: Add TLS-SRP (RFC 5054) support Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: use system srp and mpi libs, not local copies Created 9 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/platform_file.h" 9 #include "base/platform_file.h"
10 #include "base/stl_util-inl.h" 10 #include "base/stl_util-inl.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 bool can_read_raw_cookies_; 119 bool can_read_raw_cookies_;
120 120
121 DISALLOW_COPY_AND_ASSIGN(SecurityState); 121 DISALLOW_COPY_AND_ASSIGN(SecurityState);
122 }; 122 };
123 123
124 ChildProcessSecurityPolicy::ChildProcessSecurityPolicy() { 124 ChildProcessSecurityPolicy::ChildProcessSecurityPolicy() {
125 // We know about these schemes and believe them to be safe. 125 // We know about these schemes and believe them to be safe.
126 RegisterWebSafeScheme(chrome::kHttpScheme); 126 RegisterWebSafeScheme(chrome::kHttpScheme);
127 RegisterWebSafeScheme(chrome::kHttpsScheme); 127 RegisterWebSafeScheme(chrome::kHttpsScheme);
128 RegisterWebSafeScheme(chrome::kHttpsvScheme);
128 RegisterWebSafeScheme(chrome::kFtpScheme); 129 RegisterWebSafeScheme(chrome::kFtpScheme);
129 RegisterWebSafeScheme(chrome::kDataScheme); 130 RegisterWebSafeScheme(chrome::kDataScheme);
130 RegisterWebSafeScheme("feed"); 131 RegisterWebSafeScheme("feed");
131 RegisterWebSafeScheme(chrome::kExtensionScheme); 132 RegisterWebSafeScheme(chrome::kExtensionScheme);
132 RegisterWebSafeScheme(chrome::kBlobScheme); 133 RegisterWebSafeScheme(chrome::kBlobScheme);
133 134
134 // We know about the following psuedo schemes and treat them specially. 135 // We know about the following psuedo schemes and treat them specially.
135 RegisterPseudoScheme(chrome::kAboutScheme); 136 RegisterPseudoScheme(chrome::kAboutScheme);
136 RegisterPseudoScheme(chrome::kJavaScriptScheme); 137 RegisterPseudoScheme(chrome::kJavaScriptScheme);
137 RegisterPseudoScheme(chrome::kViewSourceScheme); 138 RegisterPseudoScheme(chrome::kViewSourceScheme);
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 405
405 bool ChildProcessSecurityPolicy::CanReadRawCookies(int child_id) { 406 bool ChildProcessSecurityPolicy::CanReadRawCookies(int child_id) {
406 base::AutoLock lock(lock_); 407 base::AutoLock lock(lock_);
407 408
408 SecurityStateMap::iterator state = security_state_.find(child_id); 409 SecurityStateMap::iterator state = security_state_.find(child_id);
409 if (state == security_state_.end()) 410 if (state == security_state_.end())
410 return false; 411 return false;
411 412
412 return state->second->can_read_raw_cookies(); 413 return state->second->can_read_raw_cookies();
413 } 414 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698