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

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

Issue 7633077: Refactor syncapi.h (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Set of patches to refactor syncapi.h Created 9 years, 4 months 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) 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/syncable.h" 5 #include "chrome/browser/sync/syncable/syncable.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include <sys/stat.h> 9 #include <sys/stat.h>
10 #if defined(OS_POSIX) 10 #if defined(OS_POSIX)
11 #include <sys/time.h> 11 #include <sys/time.h>
12 #endif 12 #endif
13 #include <sys/types.h> 13 #include <sys/types.h>
14 #include <time.h> 14 #include <time.h>
15 #if defined(OS_MACOSX) 15 #if defined(OS_MACOSX)
16 #include <CoreFoundation/CoreFoundation.h> 16 #include <CoreFoundation/CoreFoundation.h>
17 #elif defined(OS_WIN) 17 #elif defined(OS_WIN)
18 #include <shlwapi.h> // for PathMatchSpec 18 #include <shlwapi.h> // for PathMatchSpec
19 #endif 19 #endif
20 20
21 #include <algorithm> 21 #include <algorithm>
22 #include <cstring> 22 #include <cstring>
23 #include <functional> 23 #include <functional>
24 #include <iomanip> 24 #include <iomanip>
25 #include <iterator> 25 #include <iterator>
26 #include <limits> 26 #include <limits>
27 #include <set> 27 #include <set>
28 #include <string> 28 #include <string>
29 29
30 #include "base/file_util.h"
30 #include "base/hash_tables.h" 31 #include "base/hash_tables.h"
31 #include "base/file_util.h"
32 #include "base/logging.h" 32 #include "base/logging.h"
33 #include "base/memory/scoped_ptr.h" 33 #include "base/memory/scoped_ptr.h"
34 #include "base/perftimer.h" 34 #include "base/perftimer.h"
35 #include "base/stl_util.h"
35 #include "base/string_number_conversions.h" 36 #include "base/string_number_conversions.h"
36 #include "base/string_util.h" 37 #include "base/string_util.h"
37 #include "base/stl_util.h"
38 #include "base/time.h" 38 #include "base/time.h"
39 #include "base/tracked.h" 39 #include "base/tracked.h"
40 #include "base/utf_string_conversions.h" 40 #include "base/utf_string_conversions.h"
41 #include "base/values.h" 41 #include "base/values.h"
42 #include "chrome/browser/sync/internal_api/read_transaction.h"
tim (not reviewing) 2011/08/16 20:08:03 hrm... this looks odd. internal_api::ReadTransact
rlarocque 2011/08/16 22:19:19 Done. (both removing the include and adding a DEP
42 #include "chrome/browser/sync/protocol/proto_value_conversions.h" 43 #include "chrome/browser/sync/protocol/proto_value_conversions.h"
43 #include "chrome/browser/sync/protocol/service_constants.h" 44 #include "chrome/browser/sync/protocol/service_constants.h"
44 #include "chrome/browser/sync/syncable/directory_backing_store.h" 45 #include "chrome/browser/sync/syncable/directory_backing_store.h"
45 #include "chrome/browser/sync/syncable/directory_change_delegate.h" 46 #include "chrome/browser/sync/syncable/directory_change_delegate.h"
46 #include "chrome/browser/sync/syncable/directory_manager.h" 47 #include "chrome/browser/sync/syncable/directory_manager.h"
47 #include "chrome/browser/sync/syncable/model_type.h" 48 #include "chrome/browser/sync/syncable/model_type.h"
48 #include "chrome/browser/sync/syncable/syncable-inl.h"
49 #include "chrome/browser/sync/syncable/syncable_changes_version.h" 49 #include "chrome/browser/sync/syncable/syncable_changes_version.h"
50 #include "chrome/browser/sync/syncable/syncable_columns.h" 50 #include "chrome/browser/sync/syncable/syncable_columns.h"
51 #include "chrome/browser/sync/syncable/syncable_enum_conversions.h" 51 #include "chrome/browser/sync/syncable/syncable_enum_conversions.h"
52 #include "chrome/browser/sync/syncable/syncable-inl.h"
52 #include "chrome/browser/sync/syncable/transaction_observer.h" 53 #include "chrome/browser/sync/syncable/transaction_observer.h"
53 #include "chrome/browser/sync/util/logging.h" 54 #include "chrome/browser/sync/util/logging.h"
54 #include "net/base/escape.h" 55 #include "net/base/escape.h"
55 56
56 namespace { 57 namespace {
57 enum InvariantCheckLevel { 58 enum InvariantCheckLevel {
58 OFF = 0, 59 OFF = 0,
59 VERIFY_IN_MEMORY = 1, 60 VERIFY_IN_MEMORY = 1,
60 FULL_DB_VERIFICATION = 2 61 FULL_DB_VERIFICATION = 2
61 }; 62 };
(...skipping 1878 matching lines...) Expand 10 before | Expand all | Expand 10 after
1940 CHECK(result); 1941 CHECK(result);
1941 for (iterator i = GetParentChildIndexLowerBound(lock, parent_id), 1942 for (iterator i = GetParentChildIndexLowerBound(lock, parent_id),
1942 end = GetParentChildIndexUpperBound(lock, parent_id); 1943 end = GetParentChildIndexUpperBound(lock, parent_id);
1943 i != end; ++i) { 1944 i != end; ++i) {
1944 DCHECK_EQ(parent_id, (*i)->ref(PARENT_ID)); 1945 DCHECK_EQ(parent_id, (*i)->ref(PARENT_ID));
1945 result->push_back((*i)->ref(META_HANDLE)); 1946 result->push_back((*i)->ref(META_HANDLE));
1946 } 1947 }
1947 } 1948 }
1948 1949
1949 } // namespace syncable 1950 } // namespace syncable
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698