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

Side by Side Diff: content/browser/quota/mock_quota_manager.cc

Issue 492873002: Collapse fileapi, webkit_blob, webkit_database, quota, and webkit_common namespaces into single sto… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos build Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/quota/mock_quota_manager.h" 5 #include "content/browser/quota/mock_quota_manager.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.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/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
11 #include "url/gurl.h" 11 #include "url/gurl.h"
12 12
13 using quota::kQuotaStatusOk; 13 using storage::kQuotaStatusOk;
14 14
15 namespace content { 15 namespace content {
16 16
17 MockQuotaManager::OriginInfo::OriginInfo( 17 MockQuotaManager::OriginInfo::OriginInfo(
18 const GURL& origin, 18 const GURL& origin,
19 StorageType type, 19 StorageType type,
20 int quota_client_mask, 20 int quota_client_mask,
21 base::Time modified) 21 base::Time modified)
22 : origin(origin), 22 : origin(origin),
23 type(type), 23 type(type),
(...skipping 12 matching lines...) Expand all
36 base::SingleThreadTaskRunner* io_thread, 36 base::SingleThreadTaskRunner* io_thread,
37 base::SequencedTaskRunner* db_thread, 37 base::SequencedTaskRunner* db_thread,
38 SpecialStoragePolicy* special_storage_policy) 38 SpecialStoragePolicy* special_storage_policy)
39 : QuotaManager(is_incognito, profile_path, io_thread, db_thread, 39 : QuotaManager(is_incognito, profile_path, io_thread, db_thread,
40 special_storage_policy), 40 special_storage_policy),
41 weak_factory_(this) { 41 weak_factory_(this) {
42 } 42 }
43 43
44 void MockQuotaManager::GetUsageAndQuota( 44 void MockQuotaManager::GetUsageAndQuota(
45 const GURL& origin, 45 const GURL& origin,
46 quota::StorageType type, 46 storage::StorageType type,
47 const GetUsageAndQuotaCallback& callback) { 47 const GetUsageAndQuotaCallback& callback) {
48 StorageInfo& info = usage_and_quota_map_[std::make_pair(origin, type)]; 48 StorageInfo& info = usage_and_quota_map_[std::make_pair(origin, type)];
49 callback.Run(quota::kQuotaStatusOk, info.usage, info.quota); 49 callback.Run(storage::kQuotaStatusOk, info.usage, info.quota);
50 } 50 }
51 51
52 void MockQuotaManager::SetQuota(const GURL& origin, StorageType type, 52 void MockQuotaManager::SetQuota(const GURL& origin, StorageType type,
53 int64 quota) { 53 int64 quota) {
54 usage_and_quota_map_[std::make_pair(origin, type)].quota = quota; 54 usage_and_quota_map_[std::make_pair(origin, type)].quota = quota;
55 } 55 }
56 56
57 bool MockQuotaManager::AddOrigin( 57 bool MockQuotaManager::AddOrigin(
58 const GURL& origin, 58 const GURL& origin,
59 StorageType type, 59 StorageType type,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 callback.Run(*origins, storage_type); 138 callback.Run(*origins, storage_type);
139 } 139 }
140 140
141 void MockQuotaManager::DidDeleteOriginData( 141 void MockQuotaManager::DidDeleteOriginData(
142 const StatusCallback& callback, 142 const StatusCallback& callback,
143 QuotaStatusCode status) { 143 QuotaStatusCode status) {
144 callback.Run(status); 144 callback.Run(status);
145 } 145 }
146 146
147 } // namespace content 147 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/quota/mock_quota_manager.h ('k') | content/browser/quota/mock_quota_manager_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698