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

Side by Side Diff: webkit/blob/blob_storage_controller.cc

Issue 11410019: ********** Chromium Blob hacking (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 | « webkit/blob/blob_storage_controller.h ('k') | webkit/blob/blob_url_request_job.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 "webkit/blob/blob_storage_controller.h" 5 #include "webkit/blob/blob_storage_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 #include "webkit/blob/blob_data.h" 9 #include "webkit/blob/blob_data.h"
10 10
11 error error error
12 replaced by BlobStorageContext class
13
11 namespace webkit_blob { 14 namespace webkit_blob {
12 15
13 namespace { 16 namespace {
14 17
15 // We can't use GURL directly for these hash fragment manipulations 18 // We can't use GURL directly for these hash fragment manipulations
16 // since it doesn't have specific knowlege of the BlobURL format. GURL 19 // since it doesn't have specific knowlege of the BlobURL format. GURL
17 // treats BlobURLs as if they were PathURLs which don't support hash 20 // treats BlobURLs as if they were PathURLs which don't support hash
18 // fragments. 21 // fragments.
19 22
20 bool BlobUrlHasRef(const GURL& url) { 23 bool BlobUrlHasRef(const GURL& url) {
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 bool BlobStorageController::DecrementBlobDataUsage(BlobData* blob_data) { 245 bool BlobStorageController::DecrementBlobDataUsage(BlobData* blob_data) {
243 BlobDataUsageMap::iterator found = blob_data_usage_count_.find(blob_data); 246 BlobDataUsageMap::iterator found = blob_data_usage_count_.find(blob_data);
244 DCHECK(found != blob_data_usage_count_.end()); 247 DCHECK(found != blob_data_usage_count_.end());
245 if (--(found->second)) 248 if (--(found->second))
246 return false; // Still in use 249 return false; // Still in use
247 blob_data_usage_count_.erase(found); 250 blob_data_usage_count_.erase(found);
248 return true; 251 return true;
249 } 252 }
250 253
251 } // namespace webkit_blob 254 } // namespace webkit_blob
OLDNEW
« no previous file with comments | « webkit/blob/blob_storage_controller.h ('k') | webkit/blob/blob_url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698