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

Unified Diff: chrome/browser/safe_browsing/client_side_detection_service.cc

Issue 6286038: Add initial code to do filename munging in the FileSystem.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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
Index: chrome/browser/safe_browsing/client_side_detection_service.cc
===================================================================
--- chrome/browser/safe_browsing/client_side_detection_service.cc (revision 72915)
+++ chrome/browser/safe_browsing/client_side_detection_service.cc (working copy)
@@ -67,10 +67,10 @@
new ClientSideDetectionService(model_path, request_context_getter));
// We try to open the model file right away and start fetching it if
// it does not already exist on disk.
- base::FileUtilProxy::CreateOrOpenCallback* cb =
+ base::FileUtilProxyBase::CreateOrOpenCallback* cb =
service.get()->callback_factory_.NewCallback(
&ClientSideDetectionService::OpenModelFileDone);
- if (!base::FileUtilProxy::CreateOrOpen(
+ if (!base::FileUtilProxy::GetInstance()->CreateOrOpen(
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
model_path,
base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ,
@@ -161,11 +161,12 @@
base::PassPlatformFile file,
bool created) {
model_file_ = file.ReleaseValue();
- base::FileUtilProxy::ReadWriteCallback* cb = callback_factory_.NewCallback(
- &ClientSideDetectionService::WriteModelFileDone);
+ base::FileUtilProxyBase::ReadWriteCallback* cb =
+ callback_factory_.NewCallback(
+ &ClientSideDetectionService::WriteModelFileDone);
if (!created ||
base::PLATFORM_FILE_OK != error_code ||
- !base::FileUtilProxy::Write(
+ !base::FileUtilProxy::GetInstance()->Write(
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
model_file_,
0 /* offset */, tmp_model_string_->data(), tmp_model_string_->size(),
@@ -196,7 +197,7 @@
void ClientSideDetectionService::CloseModelFile() {
if (model_file_ != base::kInvalidPlatformFileValue) {
- base::FileUtilProxy::Close(
+ base::FileUtilProxy::GetInstance()->Close(
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
model_file_,
NULL);
@@ -279,10 +280,10 @@
// temporary model string. TODO(noelutz): don't store the model to disk if
// it's invalid.
tmp_model_string_.reset(new std::string(data));
- base::FileUtilProxy::CreateOrOpenCallback* cb =
+ base::FileUtilProxyBase::CreateOrOpenCallback* cb =
callback_factory_.NewCallback(
&ClientSideDetectionService::CreateModelFileDone);
- if (!base::FileUtilProxy::CreateOrOpen(
+ if (!base::FileUtilProxy::GetInstance()->CreateOrOpen(
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
model_path_,
base::PLATFORM_FILE_CREATE_ALWAYS |
Property changes on: chrome\browser\safe_browsing\client_side_detection_service.cc
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698