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

Side by Side Diff: webkit/browser/appcache/appcache_storage_impl_unittest.cc

Issue 59753008: Quota: Add proxy for QuotaManager::GetUsageAndQuota (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 <stack> 5 #include <stack>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 EXPECT_EQ(quota::kStorageTypeTemporary, type); 314 EXPECT_EQ(quota::kStorageTypeTemporary, type);
315 ++notify_storage_modified_count_; 315 ++notify_storage_modified_count_;
316 last_origin_ = origin; 316 last_origin_ = origin;
317 last_delta_ = delta; 317 last_delta_ = delta;
318 } 318 }
319 319
320 // Not needed for our tests. 320 // Not needed for our tests.
321 virtual void RegisterClient(quota::QuotaClient* client) OVERRIDE {} 321 virtual void RegisterClient(quota::QuotaClient* client) OVERRIDE {}
322 virtual void NotifyOriginInUse(const GURL& origin) OVERRIDE {} 322 virtual void NotifyOriginInUse(const GURL& origin) OVERRIDE {}
323 virtual void NotifyOriginNoLongerInUse(const GURL& origin) OVERRIDE {} 323 virtual void NotifyOriginNoLongerInUse(const GURL& origin) OVERRIDE {}
324 virtual void SetUsageCacheEnabled(quota::QuotaClient::ID client_id,
325 const GURL& origin,
326 quota::StorageType type,
327 bool enabled) OVERRIDE {}
328 virtual void GetUsageAndQuota(
329 base::SingleThreadTaskRunner* original_task_runner,
kinuko 2013/11/06 06:07:26 Is this going to be always single-threaded? Then m
tzik 2013/11/06 06:10:43 Can we use SequencedTaskRunner instead of SingleTh
nhiroki 2013/11/06 06:20:17 Oops... I meant SequencedTaskRunner. Thanks! Done.
330 const GURL& origin,
331 quota::StorageType type,
332 const GetUsageAndQuotaCallback& callback) OVERRIDE {}
324 333
325 int notify_storage_accessed_count_; 334 int notify_storage_accessed_count_;
326 int notify_storage_modified_count_; 335 int notify_storage_modified_count_;
327 GURL last_origin_; 336 GURL last_origin_;
328 int last_delta_; 337 int last_delta_;
329 scoped_refptr<MockQuotaManager> mock_manager_; 338 scoped_refptr<MockQuotaManager> mock_manager_;
330 339
331 protected: 340 protected:
332 virtual ~MockQuotaManagerProxy() {} 341 virtual ~MockQuotaManagerProxy() {}
333 }; 342 };
(...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after
1950 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize1); 1959 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize1);
1951 } 1960 }
1952 1961
1953 TEST_F(AppCacheStorageImplTest, Reinitialize2) { 1962 TEST_F(AppCacheStorageImplTest, Reinitialize2) {
1954 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize2); 1963 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize2);
1955 } 1964 }
1956 1965
1957 // That's all folks! 1966 // That's all folks!
1958 1967
1959 } // namespace appcache 1968 } // namespace appcache
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698