summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/file_win.cc
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-12 21:39:37 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-12 21:39:37 +0000
commitf294da7127cd4c278aa1f172e94d382250e92e4e (patch)
tree2a7e899a35be6d2a899ae7916a3a250c362a53a9 /net/disk_cache/file_win.cc
parent59fea0a2182828f3410a16ae68296cc9dcbbf8c2 (diff)
downloadchromium_src-f294da7127cd4c278aa1f172e94d382250e92e4e.zip
chromium_src-f294da7127cd4c278aa1f172e94d382250e92e4e.tar.gz
chromium_src-f294da7127cd4c278aa1f172e94d382250e92e4e.tar.bz2
Step 2 in porting disk cache to using FilePath.
BUG=24444 Review URL: http://codereview.chromium.org/270066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28742 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/file_win.cc')
-rw-r--r--net/disk_cache/file_win.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/disk_cache/file_win.cc b/net/disk_cache/file_win.cc
index b341caf..2b1f20b 100644
--- a/net/disk_cache/file_win.cc
+++ b/net/disk_cache/file_win.cc
@@ -4,6 +4,7 @@
#include "net/disk_cache/file.h"
+#include "base/file_path.h"
#include "base/message_loop.h"
#include "base/singleton.h"
#include "net/disk_cache/disk_cache.h"
@@ -77,12 +78,13 @@ File::File(base::PlatformFile file)
sync_platform_file_(file) {
}
-bool File::Init(const std::wstring& name) {
+bool File::Init(const FilePath& name) {
DCHECK(!init_);
if (init_)
return false;
- platform_file_ = CreateFile(name.c_str(), GENERIC_READ | GENERIC_WRITE,
+ platform_file_ = CreateFile(name.value().c_str(),
+ GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
@@ -93,7 +95,8 @@ bool File::Init(const std::wstring& name) {
platform_file_, Singleton<CompletionHandler>::get());
init_ = true;
- sync_platform_file_ = CreateFile(name.c_str(), GENERIC_READ | GENERIC_WRITE,
+ sync_platform_file_ = CreateFile(name.value().c_str(),
+ GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, 0, NULL);