OLD | NEW |
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 "content/browser/child_process_security_policy.h" | 5 #include "content/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" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
12 #include "chrome/common/bindings_policy.h" | |
13 #include "chrome/common/url_constants.h" | 12 #include "chrome/common/url_constants.h" |
| 13 #include "content/common/bindings_policy.h" |
14 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
15 #include "net/url_request/url_request.h" | 15 #include "net/url_request/url_request.h" |
16 | 16 |
17 static const int kReadFilePermissions = | 17 static const int kReadFilePermissions = |
18 base::PLATFORM_FILE_OPEN | | 18 base::PLATFORM_FILE_OPEN | |
19 base::PLATFORM_FILE_READ | | 19 base::PLATFORM_FILE_READ | |
20 base::PLATFORM_FILE_EXCLUSIVE_READ | | 20 base::PLATFORM_FILE_EXCLUSIVE_READ | |
21 base::PLATFORM_FILE_ASYNC; | 21 base::PLATFORM_FILE_ASYNC; |
22 | 22 |
23 static const int kEnumerateDirectoryPermissions = | 23 static const int kEnumerateDirectoryPermissions = |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 | 421 |
422 bool ChildProcessSecurityPolicy::CanReadRawCookies(int child_id) { | 422 bool ChildProcessSecurityPolicy::CanReadRawCookies(int child_id) { |
423 base::AutoLock lock(lock_); | 423 base::AutoLock lock(lock_); |
424 | 424 |
425 SecurityStateMap::iterator state = security_state_.find(child_id); | 425 SecurityStateMap::iterator state = security_state_.find(child_id); |
426 if (state == security_state_.end()) | 426 if (state == security_state_.end()) |
427 return false; | 427 return false; |
428 | 428 |
429 return state->second->can_read_raw_cookies(); | 429 return state->second->can_read_raw_cookies(); |
430 } | 430 } |
OLD | NEW |