OLD | NEW |
---|---|
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 "chrome/browser/sync/syncable/directory_backing_store.h" | 5 #include "chrome/browser/sync/syncable/directory_backing_store.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... | |
23 #include "chrome/browser/sync/syncable/syncable_columns.h" | 23 #include "chrome/browser/sync/syncable/syncable_columns.h" |
24 #include "chrome/browser/sync/util/sqlite_utils.h" | 24 #include "chrome/browser/sync/util/sqlite_utils.h" |
25 #include "chrome/browser/sync/util/time.h" | 25 #include "chrome/browser/sync/util/time.h" |
26 #include "chrome/common/random.h" | 26 #include "chrome/common/random.h" |
27 #include "third_party/sqlite/sqlite3.h" | 27 #include "third_party/sqlite/sqlite3.h" |
28 | 28 |
29 // Sometimes threads contend on the DB lock itself, especially when one thread | 29 // Sometimes threads contend on the DB lock itself, especially when one thread |
30 // is calling SaveChanges. In the worst case scenario, the user can put his | 30 // is calling SaveChanges. In the worst case scenario, the user can put his |
31 // laptop to sleep during db contention, and wake up the laptop days later, so | 31 // laptop to sleep during db contention, and wake up the laptop days later, so |
32 // infinity seems like the best choice here. | 32 // infinity seems like the best choice here. |
33 const int kDirectoryBackingStoreBusyTimeoutMs = std::numeric_limits<int>::max(); | 33 const int kDirectoryBackingStoreBusyTimeoutMs = INT_MAX; |
Ryan Sleevi
2011/11/24 20:41:23
I thought Mark didn't like changes like this?
Nico
2011/11/24 20:42:18
He didn't like it for CFTimeInterval which is type
| |
34 | 34 |
35 using std::string; | 35 using std::string; |
36 | 36 |
37 namespace syncable { | 37 namespace syncable { |
38 | 38 |
39 // This just has to be big enough to hold an UPDATE or INSERT statement that | 39 // This just has to be big enough to hold an UPDATE or INSERT statement that |
40 // modifies all the columns in the entry table. | 40 // modifies all the columns in the entry table. |
41 static const string::size_type kUpdateStatementBufferSize = 2048; | 41 static const string::size_type kUpdateStatementBufferSize = 2048; |
42 | 42 |
43 // Increment this version whenever updating DB tables. | 43 // Increment this version whenever updating DB tables. |
(...skipping 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1255 "id TEXT primary key, " | 1255 "id TEXT primary key, " |
1256 "name TEXT, " | 1256 "name TEXT, " |
1257 "store_birthday TEXT, " | 1257 "store_birthday TEXT, " |
1258 "db_create_version TEXT, " | 1258 "db_create_version TEXT, " |
1259 "db_create_time INT, " | 1259 "db_create_time INT, " |
1260 "next_id INT default -2, " | 1260 "next_id INT default -2, " |
1261 "cache_guid TEXT )"); | 1261 "cache_guid TEXT )"); |
1262 return ExecQuery(load_dbhandle_, query.c_str()); | 1262 return ExecQuery(load_dbhandle_, query.c_str()); |
1263 } | 1263 } |
1264 } // namespace syncable | 1264 } // namespace syncable |
OLD | NEW |