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