OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // Typesafe composition of SQL query strings. | 5 // Typesafe composition of SQL query strings. |
6 | 6 |
7 #ifndef CHROME_BROWSER_SYNC_UTIL_QUERY_HELPERS_H_ | 7 #ifndef CHROME_BROWSER_SYNC_UTIL_QUERY_HELPERS_H_ |
8 #define CHROME_BROWSER_SYNC_UTIL_QUERY_HELPERS_H_ | 8 #define CHROME_BROWSER_SYNC_UTIL_QUERY_HELPERS_H_ |
9 | 9 |
10 #include <limits> | 10 #include <limits> |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "build/build_config.h" |
16 #include "chrome/browser/sync/util/sync_types.h" | 17 #include "chrome/browser/sync/util/sync_types.h" |
17 #include "third_party/sqlite/preprocessed/sqlite3.h" | 18 #include "third_party/sqlite/preprocessed/sqlite3.h" |
18 | 19 |
19 // Sometimes threads contend on the DB lock itself, especially when one thread | 20 // Sometimes threads contend on the DB lock itself, especially when one thread |
20 // is calling SaveChanges. In the worst case scenario, the user can put his | 21 // is calling SaveChanges. In the worst case scenario, the user can put his |
21 // laptop to sleep during db contention, and wake up the laptop days later, so | 22 // laptop to sleep during db contention, and wake up the laptop days later, so |
22 // infinity seems like the best choice here. | 23 // infinity seems like the best choice here. |
23 const int kDirectoryBackingStoreBusyTimeoutMs = std::numeric_limits<int>::max(); | 24 const int kDirectoryBackingStoreBusyTimeoutMs = std::numeric_limits<int>::max(); |
24 | 25 |
25 enum SqliteNullType { | 26 enum SqliteNullType { |
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 | 690 |
690 DISALLOW_COPY_AND_ASSIGN(ScopedStatementResetter); | 691 DISALLOW_COPY_AND_ASSIGN(ScopedStatementResetter); |
691 }; | 692 }; |
692 | 693 |
693 // Useful for encoding any sequence of bytes into a string that can be used in | 694 // Useful for encoding any sequence of bytes into a string that can be used in |
694 // a table name. Kind of like hex encoding, except that A is zero and P is 15. | 695 // a table name. Kind of like hex encoding, except that A is zero and P is 15. |
695 std::string APEncode(const std::string& in); | 696 std::string APEncode(const std::string& in); |
696 std::string APDecode(const std::string& in); | 697 std::string APDecode(const std::string& in); |
697 | 698 |
698 #endif // CHROME_BROWSER_SYNC_UTIL_QUERY_HELPERS_H_ | 699 #endif // CHROME_BROWSER_SYNC_UTIL_QUERY_HELPERS_H_ |
OLD | NEW |