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

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

Issue 1139323003: Discard duplicate includes of files from storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Review Comments 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
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 <string>
8 #include <vector> 7 #include <vector>
9 8
10 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
11 #include "base/bind.h" 10 #include "base/bind.h"
12 #include "base/files/file_util.h" 11 #include "base/files/file_util.h"
13 #include "base/time/time.h"
14 #include "sql/connection.h" 12 #include "sql/connection.h"
15 #include "sql/meta_table.h" 13 #include "sql/meta_table.h"
16 #include "sql/statement.h" 14 #include "sql/statement.h"
17 #include "sql/transaction.h" 15 #include "sql/transaction.h"
18 #include "storage/browser/quota/special_storage_policy.h" 16 #include "storage/browser/quota/special_storage_policy.h"
19 #include "url/gurl.h"
20 17
21 namespace storage { 18 namespace storage {
22 namespace { 19 namespace {
23 20
24 // Definitions for database schema. 21 // Definitions for database schema.
25 22
26 const int kCurrentVersion = 4; 23 const int kCurrentVersion = 4;
27 const int kCompatibleVersion = 2; 24 const int kCompatibleVersion = 2;
28 25
29 const char kHostQuotaTable[] = "HostQuotaTable"; 26 const char kHostQuotaTable[] = "HostQuotaTable";
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 if (lhs.origin < rhs.origin) return true; 645 if (lhs.origin < rhs.origin) return true;
649 if (rhs.origin < lhs.origin) return false; 646 if (rhs.origin < lhs.origin) return false;
650 if (lhs.type < rhs.type) return true; 647 if (lhs.type < rhs.type) return true;
651 if (rhs.type < lhs.type) return false; 648 if (rhs.type < lhs.type) return false;
652 if (lhs.used_count < rhs.used_count) return true; 649 if (lhs.used_count < rhs.used_count) return true;
653 if (rhs.used_count < lhs.used_count) return false; 650 if (rhs.used_count < lhs.used_count) return false;
654 return lhs.last_access_time < rhs.last_access_time; 651 return lhs.last_access_time < rhs.last_access_time;
655 } 652 }
656 653
657 } // namespace storage 654 } // namespace storage
OLDNEW
« no previous file with comments | « storage/browser/fileapi/sandbox_quota_observer.cc ('k') | storage/browser/quota/quota_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698