| Index: webkit/browser/fileapi/quota/quota_reservation_manager_unittest.cc
|
| diff --git a/webkit/browser/fileapi/quota/quota_reservation_manager_unittest.cc b/webkit/browser/fileapi/quota/quota_reservation_manager_unittest.cc
|
| index 86590c7a69a85667a60ae775cd6274d18506f156..d9a521d4324797c97319a9c09ac31109d2a2939f 100644
|
| --- a/webkit/browser/fileapi/quota/quota_reservation_manager_unittest.cc
|
| +++ b/webkit/browser/fileapi/quota/quota_reservation_manager_unittest.cc
|
| @@ -23,7 +23,6 @@ const FileSystemType kType = kFileSystemTypeTemporary;
|
| const int64 kInitialFileSize = 30;
|
|
|
| typedef QuotaReservationManager::ReserveQuotaCallback ReserveQuotaCallback;
|
| -typedef QuotaReservationManager::StatusCallback StatusCallback;
|
|
|
| class FakeBackend : public QuotaReservationManager::QuotaBackend {
|
| public:
|
| @@ -55,19 +54,16 @@ class FakeBackend : public QuotaReservationManager::QuotaBackend {
|
|
|
| virtual void CommitQuotaUsage(const GURL& origin,
|
| FileSystemType type,
|
| - int64 delta,
|
| - const StatusCallback& callback) OVERRIDE {
|
| + int64 delta) OVERRIDE {
|
| EXPECT_EQ(GURL(kOrigin), origin);
|
| EXPECT_EQ(kType, type);
|
| on_disk_usage_ += delta;
|
| - base::MessageLoopProxy::current()->PostTask(
|
| - FROM_HERE, base::Bind(callback, base::PLATFORM_FILE_OK));
|
| }
|
|
|
| - virtual void IncreaseDirtyCount(const GURL& origin,
|
| - FileSystemType type) OVERRIDE {}
|
| - virtual void DecreaseDirtyCount(const GURL& origin,
|
| - FileSystemType type) OVERRIDE {}
|
| + virtual void IncrementDirtyCount(const GURL& origin,
|
| + FileSystemType type) OVERRIDE {}
|
| + virtual void DecrementDirtyCount(const GURL& origin,
|
| + FileSystemType type) OVERRIDE {}
|
|
|
| int64 on_memory_usage() { return on_memory_usage_; }
|
| int64 on_disk_usage() { return on_disk_usage_; }
|
| @@ -106,14 +102,12 @@ class QuotaReservationManagerTest : public testing::Test {
|
| file_path_ = work_dir_.path().Append(FILE_PATH_LITERAL("hoge"));
|
| SetFileSize(kInitialFileSize);
|
|
|
| - fake_backend_.reset(new FakeBackend);
|
| - reservation_manager_.reset(new QuotaReservationManager(
|
| - fake_backend_.get()));
|
| + scoped_ptr<QuotaReservationManager::QuotaBackend> backend(new FakeBackend);
|
| + reservation_manager_.reset(new QuotaReservationManager(backend.Pass()));
|
| }
|
|
|
| virtual void TearDown() OVERRIDE {
|
| reservation_manager_.reset();
|
| - fake_backend_.reset();
|
| }
|
|
|
| int64 GetFileSize() {
|
| @@ -140,7 +134,7 @@ class QuotaReservationManagerTest : public testing::Test {
|
| }
|
|
|
| FakeBackend* fake_backend() {
|
| - return fake_backend_.get();
|
| + return static_cast<FakeBackend*>(reservation_manager_->backend_.get());
|
| }
|
|
|
| QuotaReservationManager* reservation_manager() {
|
| @@ -155,7 +149,6 @@ class QuotaReservationManagerTest : public testing::Test {
|
| base::MessageLoop message_loop_;
|
| base::ScopedTempDir work_dir_;
|
| base::FilePath file_path_;
|
| - scoped_ptr<FakeBackend> fake_backend_;
|
| scoped_ptr<QuotaReservationManager> reservation_manager_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(QuotaReservationManagerTest);
|
|
|