| 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 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 if (data_path_.empty()) | 409 if (data_path_.empty()) |
| 410 return; | 410 return; |
| 411 | 411 |
| 412 if (force_keep_session_state_) | 412 if (force_keep_session_state_) |
| 413 return; | 413 return; |
| 414 | 414 |
| 415 bool has_session_only_databases = | 415 bool has_session_only_databases = |
| 416 special_storage_policy_ && | 416 special_storage_policy_ && |
| 417 special_storage_policy_->HasSessionOnlyOrigins(); | 417 special_storage_policy_->HasSessionOnlyOrigins(); |
| 418 | 418 |
| 419 // Clearning only session-only databases, and there are none. | 419 // Clearing only session-only databases, and there are none. |
| 420 if (!has_session_only_databases) | 420 if (!has_session_only_databases) |
| 421 return; | 421 return; |
| 422 | 422 |
| 423 TaskRunner()->PostTask( | 423 TaskRunner()->PostTask( |
| 424 FROM_HERE, | 424 FROM_HERE, |
| 425 base::Bind( | 425 base::Bind( |
| 426 &ClearSessionOnlyOrigins, data_path_, special_storage_policy_)); | 426 &ClearSessionOnlyOrigins, data_path_, special_storage_policy_)); |
| 427 } | 427 } |
| 428 | 428 |
| 429 base::FilePath IndexedDBContextImpl::GetIndexedDBFilePath( | 429 base::FilePath IndexedDBContextImpl::GetIndexedDBFilePath( |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 origin_set_.reset(); | 530 origin_set_.reset(); |
| 531 origin_size_map_.clear(); | 531 origin_size_map_.clear(); |
| 532 space_available_map_.clear(); | 532 space_available_map_.clear(); |
| 533 } | 533 } |
| 534 | 534 |
| 535 base::TaskRunner* IndexedDBContextImpl::TaskRunner() const { | 535 base::TaskRunner* IndexedDBContextImpl::TaskRunner() const { |
| 536 return task_runner_; | 536 return task_runner_; |
| 537 } | 537 } |
| 538 | 538 |
| 539 } // namespace content | 539 } // namespace content |
| OLD | NEW |