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_context_impl.h" | 5 #include "content/browser/indexed_db/indexed_db_context_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 return 0; | 339 return 0; |
340 | 340 |
341 return factory_->GetConnectionCount(origin_url); | 341 return factory_->GetConnectionCount(origin_url); |
342 } | 342 } |
343 | 343 |
344 base::FilePath IndexedDBContextImpl::GetFilePath(const GURL& origin_url) const { | 344 base::FilePath IndexedDBContextImpl::GetFilePath(const GURL& origin_url) const { |
345 std::string origin_id = storage::GetIdentifierFromOrigin(origin_url); | 345 std::string origin_id = storage::GetIdentifierFromOrigin(origin_url); |
346 return GetIndexedDBFilePath(origin_id); | 346 return GetIndexedDBFilePath(origin_id); |
347 } | 347 } |
348 | 348 |
349 base::FilePath IndexedDBContextImpl::GetFilePathForTesting( | |
350 const std::string& origin_id) const { | |
351 return GetIndexedDBFilePath(origin_id); | |
352 } | |
353 | |
354 void IndexedDBContextImpl::SetTaskRunnerForTesting( | 349 void IndexedDBContextImpl::SetTaskRunnerForTesting( |
355 base::SequencedTaskRunner* task_runner) { | 350 base::SequencedTaskRunner* task_runner) { |
356 DCHECK(!task_runner_.get()); | 351 DCHECK(!task_runner_.get()); |
357 task_runner_ = task_runner; | 352 task_runner_ = task_runner; |
358 } | 353 } |
359 | 354 |
360 void IndexedDBContextImpl::ConnectionOpened(const GURL& origin_url, | 355 void IndexedDBContextImpl::ConnectionOpened(const GURL& origin_url, |
361 IndexedDBConnection* connection) { | 356 IndexedDBConnection* connection) { |
362 DCHECK(TaskRunner()->RunsTasksOnCurrentThread()); | 357 DCHECK(TaskRunner()->RunsTasksOnCurrentThread()); |
363 if (quota_manager_proxy()) { | 358 if (quota_manager_proxy()) { |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 origin_set_.reset(); | 540 origin_set_.reset(); |
546 origin_size_map_.clear(); | 541 origin_size_map_.clear(); |
547 space_available_map_.clear(); | 542 space_available_map_.clear(); |
548 } | 543 } |
549 | 544 |
550 base::SequencedTaskRunner* IndexedDBContextImpl::TaskRunner() const { | 545 base::SequencedTaskRunner* IndexedDBContextImpl::TaskRunner() const { |
551 return task_runner_.get(); | 546 return task_runner_.get(); |
552 } | 547 } |
553 | 548 |
554 } // namespace content | 549 } // namespace content |
OLD | NEW |