OLD | NEW |
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/browser/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/common/blob/blob_data.h" |
10 | 10 |
11 namespace webkit_blob { | 11 namespace webkit_blob { |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 // We can't use GURL directly for these hash fragment manipulations | 15 // We can't use GURL directly for these hash fragment manipulations |
16 // since it doesn't have specific knowlege of the BlobURL format. GURL | 16 // 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 | 17 // treats BlobURLs as if they were PathURLs which don't support hash |
18 // fragments. | 18 // fragments. |
19 | 19 |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 bool BlobStorageController::DecrementBlobDataUsage(BlobData* blob_data) { | 248 bool BlobStorageController::DecrementBlobDataUsage(BlobData* blob_data) { |
249 BlobDataUsageMap::iterator found = blob_data_usage_count_.find(blob_data); | 249 BlobDataUsageMap::iterator found = blob_data_usage_count_.find(blob_data); |
250 DCHECK(found != blob_data_usage_count_.end()); | 250 DCHECK(found != blob_data_usage_count_.end()); |
251 if (--(found->second)) | 251 if (--(found->second)) |
252 return false; // Still in use | 252 return false; // Still in use |
253 blob_data_usage_count_.erase(found); | 253 blob_data_usage_count_.erase(found); |
254 return true; | 254 return true; |
255 } | 255 } |
256 | 256 |
257 } // namespace webkit_blob | 257 } // namespace webkit_blob |
OLD | NEW |