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

Side by Side Diff: chrome/browser/sync/internal_api/change_record.h

Issue 7926001: [Sync] Move change-related methods out of SyncManager::Observer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix bug in async encryption, sync to head Created 9 years, 3 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 #ifndef CHROME_BROWSER_SYNC_INTERNAL_API_CHANGE_RECORD_H_ 5 #ifndef CHROME_BROWSER_SYNC_INTERNAL_API_CHANGE_RECORD_H_
6 #define CHROME_BROWSER_SYNC_INTERNAL_API_CHANGE_RECORD_H_ 6 #define CHROME_BROWSER_SYNC_INTERNAL_API_CHANGE_RECORD_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/linked_ptr.h" 9 #include "base/memory/linked_ptr.h"
10 #include "chrome/browser/sync/protocol/password_specifics.pb.h" 10 #include "chrome/browser/sync/protocol/password_specifics.pb.h"
11 #include "chrome/browser/sync/protocol/sync.pb.h" 11 #include "chrome/browser/sync/protocol/sync.pb.h"
12 #include "chrome/browser/sync/syncable/syncable.h"
tim (not reviewing) 2011/09/20 16:04:59 Hm. I suppose this isn't enforced by the deps rule
akalin 2011/09/20 21:14:42 Turns out I don't really need it for ToValue(), al
12 #include "chrome/browser/sync/util/immutable.h" 13 #include "chrome/browser/sync/util/immutable.h"
13 14
14 namespace base { 15 namespace base {
15 class DictionaryValue; 16 class DictionaryValue;
16 } // namespace 17 } // namespace base
17 18
18 namespace sync_api { 19 namespace sync_api {
19 20
20 class BaseTransaction; 21 class BaseTransaction;
21 22
22 // TODO(zea): One day get passwords playing nicely with the rest of encryption 23 // TODO(zea): One day get passwords playing nicely with the rest of encryption
23 // and get rid of this. 24 // and get rid of this.
24 class ExtraPasswordChangeRecordData { 25 class ExtraPasswordChangeRecordData {
25 public: 26 public:
26 ExtraPasswordChangeRecordData(); 27 ExtraPasswordChangeRecordData();
(...skipping 16 matching lines...) Expand all
43 struct ChangeRecord { 44 struct ChangeRecord {
44 enum Action { 45 enum Action {
45 ACTION_ADD, 46 ACTION_ADD,
46 ACTION_DELETE, 47 ACTION_DELETE,
47 ACTION_UPDATE, 48 ACTION_UPDATE,
48 }; 49 };
49 ChangeRecord(); 50 ChangeRecord();
50 ~ChangeRecord(); 51 ~ChangeRecord();
51 52
52 // Transfers ownership of the DictionaryValue to the caller. 53 // Transfers ownership of the DictionaryValue to the caller.
53 base::DictionaryValue* ToValue(const BaseTransaction* trans) const; 54 base::DictionaryValue* ToValue(
55 const syncable::ImmutableEntryKernelMutationMap& mutations) const;
54 56
55 int64 id; 57 int64 id;
56 Action action; 58 Action action;
57 sync_pb::EntitySpecifics specifics; 59 sync_pb::EntitySpecifics specifics;
58 linked_ptr<ExtraPasswordChangeRecordData> extra; 60 linked_ptr<ExtraPasswordChangeRecordData> extra;
59 }; 61 };
60 62
61 typedef std::vector<ChangeRecord> ChangeRecordList; 63 typedef std::vector<ChangeRecord> ChangeRecordList;
62 64
63 typedef browser_sync::Immutable<ChangeRecordList> ImmutableChangeRecordList; 65 typedef browser_sync::Immutable<ChangeRecordList> ImmutableChangeRecordList;
64 66
65 } // namespace sync_api 67 } // namespace sync_api
66 68
67 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_CHANGE_RECORD_H_ 69 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_CHANGE_RECORD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698