Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: storage/browser/quota/quota_database.cc

Issue 1102353009: WIP Durable storage, chrome side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « storage/browser/quota/quota_database.h ('k') | storage/browser/quota/quota_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « storage/browser/quota/quota_database.h ('k') | storage/browser/quota/quota_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698