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

Side by Side Diff: webkit/browser/appcache/appcache_host_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
« no previous file with comments | « no previous file | webkit/browser/appcache/appcache_storage_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "net/url_request/url_request.h" 9 #include "net/url_request/url_request.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 // Not needed for our tests. 96 // Not needed for our tests.
97 virtual void RegisterClient(quota::QuotaClient* client) OVERRIDE {} 97 virtual void RegisterClient(quota::QuotaClient* client) OVERRIDE {}
98 virtual void NotifyStorageAccessed(quota::QuotaClient::ID client_id, 98 virtual void NotifyStorageAccessed(quota::QuotaClient::ID client_id,
99 const GURL& origin, 99 const GURL& origin,
100 quota::StorageType type) OVERRIDE {} 100 quota::StorageType type) OVERRIDE {}
101 virtual void NotifyStorageModified(quota::QuotaClient::ID client_id, 101 virtual void NotifyStorageModified(quota::QuotaClient::ID client_id,
102 const GURL& origin, 102 const GURL& origin,
103 quota::StorageType type, 103 quota::StorageType type,
104 int64 delta) OVERRIDE {} 104 int64 delta) OVERRIDE {}
105 virtual void SetUsageCacheEnabled(quota::QuotaClient::ID client_id,
106 const GURL& origin,
107 quota::StorageType type,
108 bool enabled) OVERRIDE {}
109 virtual void GetUsageAndQuota(
110 base::SequencedTaskRunner* original_task_runner,
111 const GURL& origin,
112 quota::StorageType type,
113 const GetUsageAndQuotaCallback& callback) OVERRIDE {}
105 114
106 virtual void NotifyOriginInUse(const GURL& origin) OVERRIDE { 115 virtual void NotifyOriginInUse(const GURL& origin) OVERRIDE {
107 inuse_[origin] += 1; 116 inuse_[origin] += 1;
108 } 117 }
109 118
110 virtual void NotifyOriginNoLongerInUse(const GURL& origin) OVERRIDE { 119 virtual void NotifyOriginNoLongerInUse(const GURL& origin) OVERRIDE {
111 inuse_[origin] -= 1; 120 inuse_[origin] -= 1;
112 } 121 }
113 122
114 int GetInUseCount(const GURL& origin) { 123 int GetInUseCount(const GURL& origin) {
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 EXPECT_EQ(&mock_frontend_, host.frontend()); 530 EXPECT_EQ(&mock_frontend_, host.frontend());
522 EXPECT_EQ(NULL, host.associated_cache()); 531 EXPECT_EQ(NULL, host.associated_cache());
523 EXPECT_FALSE(host.is_selection_pending()); 532 EXPECT_FALSE(host.is_selection_pending());
524 EXPECT_TRUE(host.preferred_manifest_url().is_empty()); 533 EXPECT_TRUE(host.preferred_manifest_url().is_empty());
525 } 534 }
526 EXPECT_EQ(0, mock_quota_proxy->GetInUseCount(kDocAndOriginUrl)); 535 EXPECT_EQ(0, mock_quota_proxy->GetInUseCount(kDocAndOriginUrl));
527 service_.set_quota_manager_proxy(NULL); 536 service_.set_quota_manager_proxy(NULL);
528 } 537 }
529 538
530 } // namespace appcache 539 } // namespace appcache
OLDNEW
« no previous file with comments | « no previous file | webkit/browser/appcache/appcache_storage_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698