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

Unified Diff: net/disk_cache/file_win.cc

Issue 270066: Step 2 in porting disk cache to using FilePath. (Closed)
Patch Set: deprecated Created 11 years, 2 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 | « net/disk_cache/file_posix.cc ('k') | net/disk_cache/mapped_file_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/file_win.cc
diff --git a/net/disk_cache/file_win.cc b/net/disk_cache/file_win.cc
index b341caf2af587f7a2fa15554dde619c9676c6f44..2b1f20bd10ba70a91834abd7e5d6e69199704426 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);
« no previous file with comments | « net/disk_cache/file_posix.cc ('k') | net/disk_cache/mapped_file_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698