| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "storage/browser/quota/quota_database.h" | 5 #include "storage/browser/quota/quota_database.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 return meta_table_->GetValue(kIsOriginTableBootstrapped, &flag) && flag; | 381 return meta_table_->GetValue(kIsOriginTableBootstrapped, &flag) && flag; |
| 382 } | 382 } |
| 383 | 383 |
| 384 bool QuotaDatabase::SetOriginDatabaseBootstrapped(bool bootstrap_flag) { | 384 bool QuotaDatabase::SetOriginDatabaseBootstrapped(bool bootstrap_flag) { |
| 385 if (!LazyOpen(true)) | 385 if (!LazyOpen(true)) |
| 386 return false; | 386 return false; |
| 387 | 387 |
| 388 return meta_table_->SetValue(kIsOriginTableBootstrapped, bootstrap_flag); | 388 return meta_table_->SetValue(kIsOriginTableBootstrapped, bootstrap_flag); |
| 389 } | 389 } |
| 390 | 390 |
| 391 bool QuotaDatabase::GetDurabilityForOrigin(const GURL& origin, bool* durable) { |
| 392 LOG(ERROR) |
| 393 << "Inside QuotaDatabase::GetDurabilityForOrigin, need to implement"; |
| 394 *durable = false; |
| 395 return true; |
| 396 } |
| 397 |
| 391 void QuotaDatabase::Commit() { | 398 void QuotaDatabase::Commit() { |
| 392 if (!db_) | 399 if (!db_) |
| 393 return; | 400 return; |
| 394 | 401 |
| 395 if (timer_.IsRunning()) | 402 if (timer_.IsRunning()) |
| 396 timer_.Stop(); | 403 timer_.Stop(); |
| 397 | 404 |
| 398 db_->CommitTransaction(); | 405 db_->CommitTransaction(); |
| 399 db_->BeginTransaction(); | 406 db_->BeginTransaction(); |
| 400 } | 407 } |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 if (lhs.origin < rhs.origin) return true; | 652 if (lhs.origin < rhs.origin) return true; |
| 646 if (rhs.origin < lhs.origin) return false; | 653 if (rhs.origin < lhs.origin) return false; |
| 647 if (lhs.type < rhs.type) return true; | 654 if (lhs.type < rhs.type) return true; |
| 648 if (rhs.type < lhs.type) return false; | 655 if (rhs.type < lhs.type) return false; |
| 649 if (lhs.used_count < rhs.used_count) return true; | 656 if (lhs.used_count < rhs.used_count) return true; |
| 650 if (rhs.used_count < lhs.used_count) return false; | 657 if (rhs.used_count < lhs.used_count) return false; |
| 651 return lhs.last_access_time < rhs.last_access_time; | 658 return lhs.last_access_time < rhs.last_access_time; |
| 652 } | 659 } |
| 653 | 660 |
| 654 } // namespace storage | 661 } // namespace storage |
| OLD | NEW |