summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/renderer_security_policy.cc
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-06 18:08:34 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-06 18:08:34 +0000
commit561abe688fc5ebcec902ea6cc2ccb4122441595e (patch)
tree5d5b001676b82c824d22619f0cc3a92b22648ab2 /chrome/browser/renderer_host/renderer_security_policy.cc
parent5ce729688e2b16ebc97decb032175ba230855c1d (diff)
downloadchromium_src-561abe688fc5ebcec902ea6cc2ccb4122441595e.zip
chromium_src-561abe688fc5ebcec902ea6cc2ccb4122441595e.tar.gz
chromium_src-561abe688fc5ebcec902ea6cc2ccb4122441595e.tar.bz2
First pass of refactoring dialogs.
Review URL: http://codereview.chromium.org/60110 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13168 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/renderer_security_policy.cc')
-rw-r--r--chrome/browser/renderer_host/renderer_security_policy.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/renderer_host/renderer_security_policy.cc b/chrome/browser/renderer_host/renderer_security_policy.cc
index 753dff8..fd34ef6 100644
--- a/chrome/browser/renderer_host/renderer_security_policy.cc
+++ b/chrome/browser/renderer_host/renderer_security_policy.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/renderer_host/renderer_security_policy.h"
+#include "base/file_path.h"
#include "base/logging.h"
#include "base/string_util.h"
#include "chrome/common/url_constants.h"
@@ -30,7 +31,7 @@ class RendererSecurityPolicy::SecurityState {
}
// Grant permission to upload the specified file to the web.
- void GrantUploadFile(const std::wstring& file) {
+ void GrantUploadFile(const FilePath& file) {
uploadable_files_.insert(file);
}
@@ -51,7 +52,7 @@ class RendererSecurityPolicy::SecurityState {
// Determine whether permission has been granted to upload file.
// Files that have not been granted default to being denied.
- bool CanUploadFile(const std::wstring& file) {
+ bool CanUploadFile(const FilePath& file) {
return uploadable_files_.find(file) != uploadable_files_.end();
}
@@ -59,7 +60,7 @@ class RendererSecurityPolicy::SecurityState {
private:
typedef std::map<std::string, bool> SchemeMap;
- typedef std::set<std::wstring> FileSet;
+ typedef std::set<FilePath> FileSet;
// Maps URL schemes to whether permission has been granted or revoked:
// |true| means the scheme has been granted.
@@ -181,7 +182,7 @@ void RendererSecurityPolicy::GrantRequestURL(int renderer_id, const GURL& url) {
}
void RendererSecurityPolicy::GrantUploadFile(int renderer_id,
- const std::wstring& file) {
+ const FilePath& file) {
AutoLock lock(lock_);
SecurityStateMap::iterator state = security_state_.find(renderer_id);
@@ -266,7 +267,7 @@ bool RendererSecurityPolicy::CanRequestURL(int renderer_id, const GURL& url) {
}
bool RendererSecurityPolicy::CanUploadFile(int renderer_id,
- const std::wstring& file) {
+ const FilePath& file) {
AutoLock lock(lock_);
SecurityStateMap::iterator state = security_state_.find(renderer_id);