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

Side by Side Diff: webkit/browser/database/database_tracker_unittest.cc

Issue 59753008: Quota: Add proxy for QuotaManager::GetUsageAndQuota (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: SingleThreadTaskRunner -> SequencedTaskRunner Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 int64 delta) OVERRIDE { 117 int64 delta) OVERRIDE {
118 EXPECT_EQ(quota::QuotaClient::kDatabase, client_id); 118 EXPECT_EQ(quota::QuotaClient::kDatabase, client_id);
119 EXPECT_EQ(quota::kStorageTypeTemporary, type); 119 EXPECT_EQ(quota::kStorageTypeTemporary, type);
120 modifications_[origin].first += 1; 120 modifications_[origin].first += 1;
121 modifications_[origin].second += delta; 121 modifications_[origin].second += delta;
122 } 122 }
123 123
124 // Not needed for our tests. 124 // Not needed for our tests.
125 virtual void NotifyOriginInUse(const GURL& origin) OVERRIDE {} 125 virtual void NotifyOriginInUse(const GURL& origin) OVERRIDE {}
126 virtual void NotifyOriginNoLongerInUse(const GURL& origin) OVERRIDE {} 126 virtual void NotifyOriginNoLongerInUse(const GURL& origin) OVERRIDE {}
127 virtual void SetUsageCacheEnabled(quota::QuotaClient::ID client_id,
128 const GURL& origin,
129 quota::StorageType type,
130 bool enabled) OVERRIDE {}
131 virtual void GetUsageAndQuota(
132 base::SequencedTaskRunner* original_task_runner,
133 const GURL& origin,
134 quota::StorageType type,
135 const GetUsageAndQuotaCallback& callback) OVERRIDE {}
127 136
128 void SimulateQuotaManagerDestroyed() { 137 void SimulateQuotaManagerDestroyed() {
129 if (registered_client_) { 138 if (registered_client_) {
130 registered_client_->OnQuotaManagerDestroyed(); 139 registered_client_->OnQuotaManagerDestroyed();
131 registered_client_ = NULL; 140 registered_client_ = NULL;
132 } 141 }
133 } 142 }
134 143
135 bool WasAccessNotified(const GURL& origin) { 144 bool WasAccessNotified(const GURL& origin) {
136 return accesses_[origin] != 0; 145 return accesses_[origin] != 0;
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 868
860 TEST(DatabaseTrackerTest, EmptyDatabaseNameIsValid) { 869 TEST(DatabaseTrackerTest, EmptyDatabaseNameIsValid) {
861 DatabaseTracker_TestHelper_Test::EmptyDatabaseNameIsValid(); 870 DatabaseTracker_TestHelper_Test::EmptyDatabaseNameIsValid();
862 } 871 }
863 872
864 TEST(DatabaseTrackerTest, HandleSqliteError) { 873 TEST(DatabaseTrackerTest, HandleSqliteError) {
865 DatabaseTracker_TestHelper_Test::HandleSqliteError(); 874 DatabaseTracker_TestHelper_Test::HandleSqliteError();
866 } 875 }
867 876
868 } // namespace webkit_database 877 } // namespace webkit_database
OLDNEW
« no previous file with comments | « webkit/browser/appcache/appcache_storage_impl_unittest.cc ('k') | webkit/browser/quota/mock_quota_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698