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

Side by Side Diff: sync/internal_api/public/base_node.h

Issue 10699044: [Sync] Move sync/{internal_api,syncable} into syncer namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_ 5 #ifndef SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_
6 #define SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_ 6 #define SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/gtest_prod_util.h" 13 #include "base/gtest_prod_util.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "googleurl/src/gurl.h" 15 #include "googleurl/src/gurl.h"
16 #include "sync/internal_api/public/syncable/model_type.h" 16 #include "sync/internal_api/public/syncable/model_type.h"
17 #include "sync/protocol/sync.pb.h" 17 #include "sync/protocol/sync.pb.h"
18 18
19 // Forward declarations of internal class types so that sync API objects 19 // Forward declarations of internal class types so that sync API objects
20 // may have opaque pointers to these types. 20 // may have opaque pointers to these types.
21 namespace base { 21 namespace base {
22 class DictionaryValue; 22 class DictionaryValue;
23 } 23 }
24 24
25 namespace syncable {
26 class BaseTransaction;
27 class Entry;
28 }
29
30 namespace sync_pb { 25 namespace sync_pb {
31 class AppSpecifics; 26 class AppSpecifics;
32 class AutofillSpecifics; 27 class AutofillSpecifics;
33 class AutofillProfileSpecifics; 28 class AutofillProfileSpecifics;
34 class BookmarkSpecifics; 29 class BookmarkSpecifics;
35 class EntitySpecifics; 30 class EntitySpecifics;
36 class ExtensionSpecifics; 31 class ExtensionSpecifics;
37 class SessionSpecifics; 32 class SessionSpecifics;
38 class NigoriSpecifics; 33 class NigoriSpecifics;
39 class PreferenceSpecifics; 34 class PreferenceSpecifics;
40 class PasswordSpecificsData; 35 class PasswordSpecificsData;
41 class ThemeSpecifics; 36 class ThemeSpecifics;
42 class TypedUrlSpecifics; 37 class TypedUrlSpecifics;
43 } 38 }
44 39
45 namespace syncer { 40 namespace syncer {
46 41
47 class BaseTransaction; 42 class BaseTransaction;
48 43
44 namespace syncable {
45 class BaseTransaction;
46 class Entry;
47 }
48
49 // A valid BaseNode will never have an ID of zero. 49 // A valid BaseNode will never have an ID of zero.
50 static const int64 kInvalidId = 0; 50 static const int64 kInvalidId = 0;
51 51
52 // BaseNode wraps syncable::Entry, and corresponds to a single object's state. 52 // BaseNode wraps syncable::Entry, and corresponds to a single object's state.
53 // This, like syncable::Entry, is intended for use on the stack. A valid 53 // This, like syncable::Entry, is intended for use on the stack. A valid
54 // transaction is necessary to create a BaseNode or any of its children. 54 // transaction is necessary to create a BaseNode or any of its children.
55 // Unlike syncable::Entry, a sync API BaseNode is identified primarily by its 55 // Unlike syncable::Entry, a sync API BaseNode is identified primarily by its
56 // int64 metahandle, which we call an ID here. 56 // int64 metahandle, which we call an ID here.
57 class BaseNode { 57 class BaseNode {
58 public: 58 public:
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 246
247 // Same as |unencrypted_data_|, but for legacy password encryption. 247 // Same as |unencrypted_data_|, but for legacy password encryption.
248 scoped_ptr<sync_pb::PasswordSpecificsData> password_data_; 248 scoped_ptr<sync_pb::PasswordSpecificsData> password_data_;
249 249
250 DISALLOW_COPY_AND_ASSIGN(BaseNode); 250 DISALLOW_COPY_AND_ASSIGN(BaseNode);
251 }; 251 };
252 252
253 } // namespace syncer 253 } // namespace syncer
254 254
255 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_ 255 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698