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

Side by Side Diff: webkit/quota/quota_database.cc

Issue 7825026: Revert "Currently, base/timer.cc calls PostTask with FROM_HERE as the Location, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/npapi/webplugin_delegate_impl_mac.mm ('k') | webkit/quota/quota_manager.cc » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "webkit/quota/quota_database.h" 5 #include "webkit/quota/quota_database.h"
6 6
7 #include <string> 7 #include <string>
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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 if (timer_.IsRunning()) 423 if (timer_.IsRunning())
424 timer_.Stop(); 424 timer_.Stop();
425 425
426 db_->CommitTransaction(); 426 db_->CommitTransaction();
427 db_->BeginTransaction(); 427 db_->BeginTransaction();
428 } 428 }
429 429
430 void QuotaDatabase::ScheduleCommit() { 430 void QuotaDatabase::ScheduleCommit() {
431 if (timer_.IsRunning()) 431 if (timer_.IsRunning())
432 return; 432 return;
433 timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(kCommitIntervalMs), 433 timer_.Start(base::TimeDelta::FromMilliseconds(kCommitIntervalMs), this,
434 this, &QuotaDatabase::Commit); 434 &QuotaDatabase::Commit);
435 } 435 }
436 436
437 bool QuotaDatabase::FindOriginUsedCount( 437 bool QuotaDatabase::FindOriginUsedCount(
438 const GURL& origin, StorageType type, int* used_count) { 438 const GURL& origin, StorageType type, int* used_count) {
439 DCHECK(used_count); 439 DCHECK(used_count);
440 if (!LazyOpen(false)) 440 if (!LazyOpen(false))
441 return false; 441 return false;
442 442
443 const char* kSql = 443 const char* kSql =
444 "SELECT used_count FROM OriginInfoTable" 444 "SELECT used_count FROM OriginInfoTable"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 if (lhs.origin < rhs.origin) return true; 682 if (lhs.origin < rhs.origin) return true;
683 if (rhs.origin < lhs.origin) return false; 683 if (rhs.origin < lhs.origin) return false;
684 if (lhs.type < rhs.type) return true; 684 if (lhs.type < rhs.type) return true;
685 if (rhs.type < lhs.type) return false; 685 if (rhs.type < lhs.type) return false;
686 if (lhs.used_count < rhs.used_count) return true; 686 if (lhs.used_count < rhs.used_count) return true;
687 if (rhs.used_count < lhs.used_count) return false; 687 if (rhs.used_count < lhs.used_count) return false;
688 return lhs.last_access_time < rhs.last_access_time; 688 return lhs.last_access_time < rhs.last_access_time;
689 } 689 }
690 690
691 } // quota namespace 691 } // quota namespace
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/webplugin_delegate_impl_mac.mm ('k') | webkit/quota/quota_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698