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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 switch (transaction->state()) { | 227 switch (transaction->state()) { |
228 case IndexedDBTransaction::CREATED: | 228 case IndexedDBTransaction::CREATED: |
229 transaction_info->SetString("status", "blocked"); | 229 transaction_info->SetString("status", "blocked"); |
230 break; | 230 break; |
231 case IndexedDBTransaction::STARTED: | 231 case IndexedDBTransaction::STARTED: |
232 if (transaction->diagnostics().tasks_scheduled > 0) | 232 if (transaction->diagnostics().tasks_scheduled > 0) |
233 transaction_info->SetString("status", "running"); | 233 transaction_info->SetString("status", "running"); |
234 else | 234 else |
235 transaction_info->SetString("status", "started"); | 235 transaction_info->SetString("status", "started"); |
236 break; | 236 break; |
| 237 case IndexedDBTransaction::COMMITTING: |
| 238 transaction_info->SetString("status", "committing"); |
237 case IndexedDBTransaction::FINISHED: | 239 case IndexedDBTransaction::FINISHED: |
238 transaction_info->SetString("status", "finished"); | 240 transaction_info->SetString("status", "finished"); |
239 break; | 241 break; |
240 } | 242 } |
241 | 243 |
242 transaction_info->SetDouble( | 244 transaction_info->SetDouble( |
243 "pid", | 245 "pid", |
244 IndexedDBDispatcherHost::TransactionIdToProcessId( | 246 IndexedDBDispatcherHost::TransactionIdToProcessId( |
245 transaction->id())); | 247 transaction->id())); |
246 transaction_info->SetDouble( | 248 transaction_info->SetDouble( |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 if (data_path_.empty()) | 449 if (data_path_.empty()) |
448 return; | 450 return; |
449 | 451 |
450 if (force_keep_session_state_) | 452 if (force_keep_session_state_) |
451 return; | 453 return; |
452 | 454 |
453 bool has_session_only_databases = | 455 bool has_session_only_databases = |
454 special_storage_policy_ && | 456 special_storage_policy_ && |
455 special_storage_policy_->HasSessionOnlyOrigins(); | 457 special_storage_policy_->HasSessionOnlyOrigins(); |
456 | 458 |
457 // Clearning only session-only databases, and there are none. | 459 // Clearing only session-only databases, and there are none. |
458 if (!has_session_only_databases) | 460 if (!has_session_only_databases) |
459 return; | 461 return; |
460 | 462 |
461 TaskRunner()->PostTask( | 463 TaskRunner()->PostTask( |
462 FROM_HERE, | 464 FROM_HERE, |
463 base::Bind( | 465 base::Bind( |
464 &ClearSessionOnlyOrigins, data_path_, special_storage_policy_)); | 466 &ClearSessionOnlyOrigins, data_path_, special_storage_policy_)); |
465 } | 467 } |
466 | 468 |
467 base::FilePath IndexedDBContextImpl::GetIndexedDBFilePath( | 469 base::FilePath IndexedDBContextImpl::GetIndexedDBFilePath( |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 origin_set_.reset(); | 569 origin_set_.reset(); |
568 origin_size_map_.clear(); | 570 origin_size_map_.clear(); |
569 space_available_map_.clear(); | 571 space_available_map_.clear(); |
570 } | 572 } |
571 | 573 |
572 base::TaskRunner* IndexedDBContextImpl::TaskRunner() const { | 574 base::TaskRunner* IndexedDBContextImpl::TaskRunner() const { |
573 return task_runner_; | 575 return task_runner_; |
574 } | 576 } |
575 | 577 |
576 } // namespace content | 578 } // namespace content |
OLD | NEW |