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

Unified Diff: net/disk_cache/simple/simple_synchronous_entry.cc

Issue 14022012: Code quality and standards in SimpleBackend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remediate Created 7 years, 8 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: net/disk_cache/simple/simple_synchronous_entry.cc
diff --git a/net/disk_cache/simple/simple_synchronous_entry.cc b/net/disk_cache/simple/simple_synchronous_entry.cc
index 509755a0508ad76243c2a29f3e37576c53ac19ef..41c8d8d3443c8288e866db7a77fd44cb9ed59eb7 100644
--- a/net/disk_cache/simple/simple_synchronous_entry.cc
+++ b/net/disk_cache/simple/simple_synchronous_entry.cc
@@ -33,7 +33,7 @@ using base::PLATFORM_FILE_OPEN;
using base::PLATFORM_FILE_READ;
using base::PLATFORM_FILE_WRITE;
using base::ReadPlatformFile;
-using base::TaskRunner;
+using base::SingleThreadTaskRunner;
using base::Time;
using base::TruncatePlatformFile;
using base::WritePlatformFile;
@@ -49,7 +49,7 @@ using simple_util::GetFileOffsetFromKeyAndDataOffset;
void SimpleSynchronousEntry::OpenEntry(
const FilePath& path,
const std::string& key,
- const scoped_refptr<TaskRunner>& callback_runner,
+ SingleThreadTaskRunner* callback_runner,
const SynchronousCreationCallback& callback) {
SimpleSynchronousEntry* sync_entry =
new SimpleSynchronousEntry(callback_runner, path, key);
@@ -66,7 +66,7 @@ void SimpleSynchronousEntry::OpenEntry(
void SimpleSynchronousEntry::CreateEntry(
const FilePath& path,
const std::string& key,
- const scoped_refptr<TaskRunner>& callback_runner,
+ SingleThreadTaskRunner* callback_runner,
const SynchronousCreationCallback& callback) {
SimpleSynchronousEntry* sync_entry =
new SimpleSynchronousEntry(callback_runner, path, key);
@@ -85,7 +85,7 @@ void SimpleSynchronousEntry::CreateEntry(
void SimpleSynchronousEntry::DoomEntry(
const FilePath& path,
const std::string& key,
- const scoped_refptr<TaskRunner>& callback_runner,
+ SingleThreadTaskRunner* callback_runner,
const net::CompletionCallback& callback) {
for (int i = 0; i < kSimpleEntryFileCount; ++i) {
FilePath to_delete = path.AppendASCII(GetFilenameFromKeyAndIndex(key, i));
@@ -157,7 +157,7 @@ void SimpleSynchronousEntry::WriteData(
}
SimpleSynchronousEntry::SimpleSynchronousEntry(
- const scoped_refptr<TaskRunner>& callback_runner,
+ SingleThreadTaskRunner* callback_runner,
const FilePath& path,
const std::string& key)
: callback_runner_(callback_runner),
@@ -302,7 +302,7 @@ int SimpleSynchronousEntry::InitializeForCreate() {
void SimpleSynchronousEntry::Doom() {
// TODO(gavinp): Consider if we should guard against redundant Doom() calls.
DoomEntry(path_, key_,
- scoped_refptr<base::TaskRunner>(), net::CompletionCallback());
+ scoped_refptr<SingleThreadTaskRunner>(), net::CompletionCallback());
}
} // namespace disk_cache
« net/disk_cache/simple/simple_index.cc ('K') | « net/disk_cache/simple/simple_synchronous_entry.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698