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

Side by Side Diff: chrome/browser/sync/syncable/directory_backing_store.cc

Issue 8690005: Remove 4 static initializers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cin Created 9 years 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 | « chrome/browser/bookmarks/bookmark_extension_api.cc ('k') | sql/connection.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 "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
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;
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
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
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_extension_api.cc ('k') | sql/connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698