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

Side by Side Diff: content/browser/storage_partition_impl.cc

Issue 383863002: Use STATIC_CONST_MEMBER_DEFINITION to make constant definitions clearer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | content/public/browser/storage_partition.h » ('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 "content/browser/storage_partition_impl.h" 5 #include "content/browser/storage_partition_impl.h"
6 6
7 #include "base/sequenced_task_runner.h" 7 #include "base/sequenced_task_runner.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "content/browser/browser_main_loop.h" 9 #include "content/browser/browser_main_loop.h"
10 #include "content/browser/fileapi/browser_file_system_helper.h" 10 #include "content/browser/fileapi/browser_file_system_helper.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 185
186 dom_storage_context->GetSessionStorageUsage( 186 dom_storage_context->GetSessionStorageUsage(
187 base::Bind(&OnSessionStorageUsageInfo, dom_storage_context, 187 base::Bind(&OnSessionStorageUsageInfo, dom_storage_context,
188 special_storage_policy, origin_matcher, 188 special_storage_policy, origin_matcher,
189 callback)); 189 callback));
190 } 190 }
191 191
192 } // namespace 192 } // namespace
193 193
194 // static 194 // static
195 const uint32 StoragePartition::REMOVE_DATA_MASK_APPCACHE = 1 << 0; 195 STATIC_CONST_MEMBER_DEFINITION const uint32
196 const uint32 StoragePartition::REMOVE_DATA_MASK_COOKIES = 1 << 1; 196 StoragePartition::REMOVE_DATA_MASK_APPCACHE;
197 const uint32 StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS = 1 << 2; 197 STATIC_CONST_MEMBER_DEFINITION const uint32
198 const uint32 StoragePartition::REMOVE_DATA_MASK_INDEXEDDB = 1 << 3; 198 StoragePartition::REMOVE_DATA_MASK_COOKIES;
199 const uint32 StoragePartition::REMOVE_DATA_MASK_LOCAL_STORAGE = 1 << 4; 199 STATIC_CONST_MEMBER_DEFINITION const uint32
200 const uint32 StoragePartition::REMOVE_DATA_MASK_SHADER_CACHE = 1 << 5; 200 StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS;
201 const uint32 StoragePartition::REMOVE_DATA_MASK_WEBSQL = 1 << 6; 201 STATIC_CONST_MEMBER_DEFINITION const uint32
202 const uint32 StoragePartition::REMOVE_DATA_MASK_WEBRTC_IDENTITY = 1 << 7; 202 StoragePartition::REMOVE_DATA_MASK_INDEXEDDB;
203 const uint32 StoragePartition::REMOVE_DATA_MASK_ALL = 0xFFFFFFFF; 203 STATIC_CONST_MEMBER_DEFINITION const uint32
204 const uint32 StoragePartition::QUOTA_MANAGED_STORAGE_MASK_TEMPORARY = 1 << 0; 204 StoragePartition::REMOVE_DATA_MASK_LOCAL_STORAGE;
205 const uint32 StoragePartition::QUOTA_MANAGED_STORAGE_MASK_PERSISTENT = 1 << 1; 205 STATIC_CONST_MEMBER_DEFINITION const uint32
206 const uint32 StoragePartition::QUOTA_MANAGED_STORAGE_MASK_SYNCABLE = 1 << 2; 206 StoragePartition::REMOVE_DATA_MASK_SHADER_CACHE;
207 const uint32 StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL = 0xFFFFFFFF; 207 STATIC_CONST_MEMBER_DEFINITION const uint32
208 StoragePartition::REMOVE_DATA_MASK_WEBSQL;
209 STATIC_CONST_MEMBER_DEFINITION const uint32
210 StoragePartition::REMOVE_DATA_MASK_WEBRTC_IDENTITY;
211 STATIC_CONST_MEMBER_DEFINITION const uint32
212 StoragePartition::REMOVE_DATA_MASK_ALL;
213 STATIC_CONST_MEMBER_DEFINITION const uint32
214 StoragePartition::QUOTA_MANAGED_STORAGE_MASK_TEMPORARY;
215 STATIC_CONST_MEMBER_DEFINITION const uint32
216 StoragePartition::QUOTA_MANAGED_STORAGE_MASK_PERSISTENT;
217 STATIC_CONST_MEMBER_DEFINITION const uint32
218 StoragePartition::QUOTA_MANAGED_STORAGE_MASK_SYNCABLE;
219 STATIC_CONST_MEMBER_DEFINITION const uint32
220 StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL;
208 221
209 // Static. 222 // Static.
210 int StoragePartitionImpl::GenerateQuotaClientMask(uint32 remove_mask) { 223 int StoragePartitionImpl::GenerateQuotaClientMask(uint32 remove_mask) {
211 int quota_client_mask = 0; 224 int quota_client_mask = 0;
212 225
213 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS) 226 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS)
214 quota_client_mask |= quota::QuotaClient::kFileSystem; 227 quota_client_mask |= quota::QuotaClient::kFileSystem;
215 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_WEBSQL) 228 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_WEBSQL)
216 quota_client_mask |= quota::QuotaClient::kDatabase; 229 quota_client_mask |= quota::QuotaClient::kDatabase;
217 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_APPCACHE) 230 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_APPCACHE)
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 net::URLRequestContextGetter* url_request_context) { 799 net::URLRequestContextGetter* url_request_context) {
787 url_request_context_ = url_request_context; 800 url_request_context_ = url_request_context;
788 } 801 }
789 802
790 void StoragePartitionImpl::SetMediaURLRequestContext( 803 void StoragePartitionImpl::SetMediaURLRequestContext(
791 net::URLRequestContextGetter* media_url_request_context) { 804 net::URLRequestContextGetter* media_url_request_context) {
792 media_url_request_context_ = media_url_request_context; 805 media_url_request_context_ = media_url_request_context;
793 } 806 }
794 807
795 } // namespace content 808 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/browser/storage_partition.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698