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 "webkit/quota/quota_database.h" | 5 #include "webkit/browser/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" |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
12 #include "base/time.h" | 12 #include "base/time.h" |
13 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
14 #include "sql/connection.h" | 14 #include "sql/connection.h" |
15 #include "sql/meta_table.h" | 15 #include "sql/meta_table.h" |
16 #include "sql/statement.h" | 16 #include "sql/statement.h" |
17 #include "sql/transaction.h" | 17 #include "sql/transaction.h" |
18 #include "webkit/quota/special_storage_policy.h" | 18 #include "webkit/browser/quota/special_storage_policy.h" |
19 | 19 |
20 namespace quota { | 20 namespace quota { |
21 namespace { | 21 namespace { |
22 | 22 |
23 // Definitions for database schema. | 23 // Definitions for database schema. |
24 | 24 |
25 const int kCurrentVersion = 4; | 25 const int kCurrentVersion = 4; |
26 const int kCompatibleVersion = 2; | 26 const int kCompatibleVersion = 2; |
27 | 27 |
28 const char kHostQuotaTable[] = "HostQuotaTable"; | 28 const char kHostQuotaTable[] = "HostQuotaTable"; |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 if (lhs.origin < rhs.origin) return true; | 652 if (lhs.origin < rhs.origin) return true; |
653 if (rhs.origin < lhs.origin) return false; | 653 if (rhs.origin < lhs.origin) return false; |
654 if (lhs.type < rhs.type) return true; | 654 if (lhs.type < rhs.type) return true; |
655 if (rhs.type < lhs.type) return false; | 655 if (rhs.type < lhs.type) return false; |
656 if (lhs.used_count < rhs.used_count) return true; | 656 if (lhs.used_count < rhs.used_count) return true; |
657 if (rhs.used_count < lhs.used_count) return false; | 657 if (rhs.used_count < lhs.used_count) return false; |
658 return lhs.last_access_time < rhs.last_access_time; | 658 return lhs.last_access_time < rhs.last_access_time; |
659 } | 659 } |
660 | 660 |
661 } // quota namespace | 661 } // quota namespace |
OLD | NEW |