| 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 "content/browser/indexed_db/indexed_db_dispatcher_host.h" | 5 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/guid.h" | 9 #include "base/guid.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "storage/browser/database/database_util.h" | 22 #include "storage/browser/database/database_util.h" |
| 23 #include "url/origin.h" | 23 #include "url/origin.h" |
| 24 | 24 |
| 25 namespace content { | 25 namespace content { |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 const char kInvalidOrigin[] = "Origin is invalid"; | 29 const char kInvalidOrigin[] = "Origin is invalid"; |
| 30 | 30 |
| 31 bool IsValidOrigin(const url::Origin& origin) { | 31 bool IsValidOrigin(const url::Origin& origin) { |
| 32 return !origin.unique(); | 32 return !origin.opaque(); |
| 33 } | 33 } |
| 34 | 34 |
| 35 } // namespace | 35 } // namespace |
| 36 | 36 |
| 37 IndexedDBDispatcherHost::IndexedDBDispatcherHost( | 37 IndexedDBDispatcherHost::IndexedDBDispatcherHost( |
| 38 int ipc_process_id, | 38 int ipc_process_id, |
| 39 net::URLRequestContextGetter* request_context_getter, | 39 net::URLRequestContextGetter* request_context_getter, |
| 40 IndexedDBContextImpl* indexed_db_context, | 40 IndexedDBContextImpl* indexed_db_context, |
| 41 ChromeBlobStorageContext* blob_storage_context) | 41 ChromeBlobStorageContext* blob_storage_context) |
| 42 : request_context_getter_(request_context_getter), | 42 : request_context_getter_(request_context_getter), |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 DCHECK(indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); | 202 DCHECK(indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); |
| 203 | 203 |
| 204 base::FilePath indexed_db_path = indexed_db_context_->data_path(); | 204 base::FilePath indexed_db_path = indexed_db_context_->data_path(); |
| 205 DCHECK(request_context_getter_); | 205 DCHECK(request_context_getter_); |
| 206 context()->GetIDBFactory()->DeleteDatabase( | 206 context()->GetIDBFactory()->DeleteDatabase( |
| 207 name, request_context_getter_, callbacks, origin, indexed_db_path, | 207 name, request_context_getter_, callbacks, origin, indexed_db_path, |
| 208 force_close); | 208 force_close); |
| 209 } | 209 } |
| 210 | 210 |
| 211 } // namespace content | 211 } // namespace content |
| OLD | NEW |