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

Side by Side Diff: content/browser/child_process_security_policy_impl.cc

Issue 2551613002: Revert "Add temporary DumpWithoutCrashing to understand why the filesystem URL origin checks are fa… (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_impl.h" 5 #include "content/browser/child_process_security_policy_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/debug/dump_without_crashing.h"
12 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
13 #include "base/logging.h" 12 #include "base/logging.h"
14 #include "base/macros.h" 13 #include "base/macros.h"
15 #include "base/memory/ptr_util.h" 14 #include "base/memory/ptr_util.h"
16 #include "base/metrics/histogram_macros.h" 15 #include "base/metrics/histogram_macros.h"
17 #include "base/strings/string_util.h" 16 #include "base/strings/string_util.h"
18 #include "build/build_config.h" 17 #include "build/build_config.h"
19 #include "content/browser/site_instance_impl.h" 18 #include "content/browser/site_instance_impl.h"
20 #include "content/common/site_isolation_policy.h" 19 #include "content/common/site_isolation_policy.h"
21 #include "content/public/browser/child_process_data.h" 20 #include "content/public/browser/child_process_data.h"
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 const storage::FileSystemURL& filesystem_url, 798 const storage::FileSystemURL& filesystem_url,
800 int permissions) { 799 int permissions) {
801 if (!filesystem_url.is_valid()) 800 if (!filesystem_url.is_valid())
802 return false; 801 return false;
803 802
804 // If |filesystem_url.origin()| is not committable in this process, then this 803 // If |filesystem_url.origin()| is not committable in this process, then this
805 // page should not be able to place content in that origin via the filesystem 804 // page should not be able to place content in that origin via the filesystem
806 // API either. 805 // API either.
807 if (!CanCommitURL(child_id, filesystem_url.origin())) { 806 if (!CanCommitURL(child_id, filesystem_url.origin())) {
808 UMA_HISTOGRAM_BOOLEAN("FileSystem.OriginFailedCanCommitURL", true); 807 UMA_HISTOGRAM_BOOLEAN("FileSystem.OriginFailedCanCommitURL", true);
809 // TODO(nick): Temporary instrumentation for https://crbug.com/654479.
810 base::debug::DumpWithoutCrashing();
811 return false; 808 return false;
812 } 809 }
813 810
814 if (filesystem_url.path().ReferencesParent()) 811 if (filesystem_url.path().ReferencesParent())
815 return false; 812 return false;
816 813
817 // Any write access is disallowed on the root path. 814 // Any write access is disallowed on the root path.
818 if (storage::VirtualPath::IsRootPath(filesystem_url.path()) && 815 if (storage::VirtualPath::IsRootPath(filesystem_url.path()) &&
819 (permissions & ~READ_FILE_GRANT)) { 816 (permissions & ~READ_FILE_GRANT)) {
820 return false; 817 return false;
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 base::AutoLock lock(lock_); 990 base::AutoLock lock(lock_);
994 991
995 SecurityStateMap::iterator state = security_state_.find(child_id); 992 SecurityStateMap::iterator state = security_state_.find(child_id);
996 if (state == security_state_.end()) 993 if (state == security_state_.end())
997 return false; 994 return false;
998 995
999 return state->second->can_send_midi_sysex(); 996 return state->second->can_send_midi_sysex();
1000 } 997 }
1001 998
1002 } // namespace content 999 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698