| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "storage/browser/blob/blob_storage_context.h" | 5 #include "storage/browser/blob/blob_storage_context.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
| 15 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
| 16 #include "base/thread_task_runner_handle.h" | 16 #include "base/thread_task_runner_handle.h" |
| 17 #include "base/trace_event/trace_event.h" | 17 #include "base/trace_event/trace_event.h" |
| 18 #include "storage/browser/blob/blob_data_builder.h" | 18 #include "storage/browser/blob/blob_data_builder.h" |
| 19 #include "storage/browser/blob/blob_data_handle.h" | |
| 20 #include "url/gurl.h" | 19 #include "url/gurl.h" |
| 21 | 20 |
| 22 namespace storage { | 21 namespace storage { |
| 23 | 22 |
| 24 namespace { | 23 namespace { |
| 25 | 24 |
| 26 // We can't use GURL directly for these hash fragment manipulations | 25 // We can't use GURL directly for these hash fragment manipulations |
| 27 // since it doesn't have specific knowlege of the BlobURL format. GURL | 26 // since it doesn't have specific knowlege of the BlobURL format. GURL |
| 28 // treats BlobURLs as if they were PathURLs which don't support hash | 27 // treats BlobURLs as if they were PathURLs which don't support hash |
| 29 // fragments. | 28 // fragments. |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 if (found == blob_map_.end()) | 470 if (found == blob_map_.end()) |
| 472 return false; | 471 return false; |
| 473 return found->second->IsBeingBuilt(); | 472 return found->second->IsBeingBuilt(); |
| 474 } | 473 } |
| 475 | 474 |
| 476 bool BlobStorageContext::IsUrlRegistered(const GURL& blob_url) { | 475 bool BlobStorageContext::IsUrlRegistered(const GURL& blob_url) { |
| 477 return public_blob_urls_.find(blob_url) != public_blob_urls_.end(); | 476 return public_blob_urls_.find(blob_url) != public_blob_urls_.end(); |
| 478 } | 477 } |
| 479 | 478 |
| 480 } // namespace storage | 479 } // namespace storage |
| OLD | NEW |