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

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

Issue 414072: sync: get rid of path_helpers (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: delete path_helpers_unittest from gyp Created 11 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
OLDNEW
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 #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 #if defined(OS_MACOSX) 9 #if defined(OS_MACOSX)
10 #include <CoreFoundation/CoreFoundation.h> 10 #include <CoreFoundation/CoreFoundation.h>
11 #endif 11 #endif
12 12
13 #include "base/hash_tables.h" 13 #include "base/hash_tables.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "chrome/browser/sync/protocol/service_constants.h" 15 #include "chrome/browser/sync/protocol/service_constants.h"
16 #include "chrome/browser/sync/syncable/syncable-inl.h" 16 #include "chrome/browser/sync/syncable/syncable-inl.h"
17 #include "chrome/browser/sync/syncable/syncable_columns.h" 17 #include "chrome/browser/sync/syncable/syncable_columns.h"
18 #include "chrome/browser/sync/util/crypto_helpers.h" 18 #include "chrome/browser/sync/util/crypto_helpers.h"
19 #include "chrome/browser/sync/util/path_helpers.h"
20 #include "chrome/browser/sync/util/query_helpers.h" 19 #include "chrome/browser/sync/util/query_helpers.h"
21 #include "third_party/sqlite/preprocessed/sqlite3.h" 20 #include "third_party/sqlite/preprocessed/sqlite3.h"
22 21
23 // Sometimes threads contend on the DB lock itself, especially when one thread 22 // Sometimes threads contend on the DB lock itself, especially when one thread
24 // is calling SaveChanges. In the worst case scenario, the user can put his 23 // is calling SaveChanges. In the worst case scenario, the user can put his
25 // laptop to sleep during db contention, and wake up the laptop days later, so 24 // laptop to sleep during db contention, and wake up the laptop days later, so
26 // infinity seems like the best choice here. 25 // infinity seems like the best choice here.
27 const int kDirectoryBackingStoreBusyTimeoutMs = std::numeric_limits<int>::max(); 26 const int kDirectoryBackingStoreBusyTimeoutMs = std::numeric_limits<int>::max();
28 27
29 using std::string; 28 using std::string;
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 600
602 sqlite3* DirectoryBackingStore::LazyGetSaveHandle() { 601 sqlite3* DirectoryBackingStore::LazyGetSaveHandle() {
603 if (!save_dbhandle_ && !OpenAndConfigureHandleHelper(&save_dbhandle_)) { 602 if (!save_dbhandle_ && !OpenAndConfigureHandleHelper(&save_dbhandle_)) {
604 DCHECK(FALSE) << "Unable to open handle for saving"; 603 DCHECK(FALSE) << "Unable to open handle for saving";
605 return NULL; 604 return NULL;
606 } 605 }
607 return save_dbhandle_; 606 return save_dbhandle_;
608 } 607 }
609 608
610 } // namespace syncable 609 } // namespace syncable
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/syncer_util.cc ('k') | chrome/browser/sync/syncable/directory_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698