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

Unified Diff: chrome/browser/net/chrome_network_delegate.cc

Issue 340053002: Proper multi profile file access check for WebRTC logs on ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/chrome_network_delegate.cc
diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc
index 8b46d9cd5982f30b7e300835067bd059c162b4d1..72ec5391aa2e262876856d6506912cf59f1447f7 100644
--- a/chrome/browser/net/chrome_network_delegate.cc
+++ b/chrome/browser/net/chrome_network_delegate.cc
@@ -796,15 +796,20 @@ bool ChromeNetworkDelegate::OnCanAccessFile(const net::URLRequest& request,
"/var/log",
};
- // The actual location of "/home/chronos/user/Downloads" is the Downloads
- // directory under the profile path ("/home/chronos/user' is a hard link to
- // current primary logged in profile.) For the support of multi-profile
- // sessions, we are switching to use explicit "$PROFILE_PATH/Downloads" path
- // and here whitelist such access.
+ // The actual location of "/home/chronos/user/Xyz" is the Xyz directory under
+ // the profile path ("/home/chronos/user' is a hard link to current primary
+ // logged in profile.) For the support of multi-profile sessions, we are
+ // switching to use explicit "$PROFILE_PATH/Xyz" path and here whitelist such
+ // access.
if (!profile_path_.empty()) {
const base::FilePath downloads = profile_path_.AppendASCII("Downloads");
if (downloads == path.StripTrailingSeparators() || downloads.IsParent(path))
return true;
+ const base::FilePath webrtc_logs = profile_path_.AppendASCII("WebRTC Logs");
+ if (webrtc_logs == path.StripTrailingSeparators() ||
+ webrtc_logs.IsParent(path)) {
+ return true;
+ }
}
#elif defined(OS_ANDROID)
// Access to files in external storage is allowed.
« 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