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

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

Issue 2826693003: Remove DumpWithoutCrashing for HasPermissionsForFileSystemFile/CanCommitURL. (Closed)
Patch Set: Created 3 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
« 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"
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 const storage::FileSystemURL& filesystem_url, 795 const storage::FileSystemURL& filesystem_url,
796 int permissions) { 796 int permissions) {
797 if (!filesystem_url.is_valid()) 797 if (!filesystem_url.is_valid())
798 return false; 798 return false;
799 799
800 // If |filesystem_url.origin()| is not committable in this process, then this 800 // If |filesystem_url.origin()| is not committable in this process, then this
801 // page should not be able to place content in that origin via the filesystem 801 // page should not be able to place content in that origin via the filesystem
802 // API either. 802 // API either.
803 if (!CanCommitURL(child_id, filesystem_url.origin())) { 803 if (!CanCommitURL(child_id, filesystem_url.origin())) {
804 UMA_HISTOGRAM_BOOLEAN("FileSystem.OriginFailedCanCommitURL", true); 804 UMA_HISTOGRAM_BOOLEAN("FileSystem.OriginFailedCanCommitURL", true);
805 // TODO(nick): Temporary instrumentation for https://crbug.com/654479.
806 base::debug::DumpWithoutCrashing();
807 return false; 805 return false;
808 } 806 }
809 807
810 if (filesystem_url.path().ReferencesParent()) 808 if (filesystem_url.path().ReferencesParent())
811 return false; 809 return false;
812 810
813 // Any write access is disallowed on the root path. 811 // Any write access is disallowed on the root path.
814 if (storage::VirtualPath::IsRootPath(filesystem_url.path()) && 812 if (storage::VirtualPath::IsRootPath(filesystem_url.path()) &&
815 (permissions & ~READ_FILE_GRANT)) { 813 (permissions & ~READ_FILE_GRANT)) {
816 return false; 814 return false;
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 base::AutoLock lock(lock_); 987 base::AutoLock lock(lock_);
990 988
991 SecurityStateMap::iterator state = security_state_.find(child_id); 989 SecurityStateMap::iterator state = security_state_.find(child_id);
992 if (state == security_state_.end()) 990 if (state == security_state_.end())
993 return false; 991 return false;
994 992
995 return state->second->can_send_midi_sysex(); 993 return state->second->can_send_midi_sysex();
996 } 994 }
997 995
998 } // namespace content 996 } // 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