OLD | NEW |
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_GLUE_AUTOFILL_CHANGE_PROCESSOR_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_AUTOFILL_CHANGE_PROCESSOR_H_ |
6 #define CHROME_BROWSER_SYNC_GLUE_AUTOFILL_CHANGE_PROCESSOR_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_AUTOFILL_CHANGE_PROCESSOR_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 static void WriteAutofillEntry(const AutofillEntry& entry, | 63 static void WriteAutofillEntry(const AutofillEntry& entry, |
64 sync_api::WriteNode* node); | 64 sync_api::WriteNode* node); |
65 // TODO(georgey) : add the same processing for CC info (already in protocol | 65 // TODO(georgey) : add the same processing for CC info (already in protocol |
66 // buffers). | 66 // buffers). |
67 | 67 |
68 protected: | 68 protected: |
69 virtual void StartImpl(Profile* profile) OVERRIDE; | 69 virtual void StartImpl(Profile* profile) OVERRIDE; |
70 virtual void StopImpl() OVERRIDE; | 70 virtual void StopImpl() OVERRIDE; |
71 | 71 |
72 private: | 72 private: |
| 73 friend class ScopedStopObserving<AutofillChangeProcessor>; |
73 void StartObserving(); | 74 void StartObserving(); |
74 void StopObserving(); | 75 void StopObserving(); |
75 | 76 |
76 // A function to remove the sync node for an autofill entry or profile. | 77 // A function to remove the sync node for an autofill entry or profile. |
77 void RemoveSyncNode(const std::string& tag, | 78 void RemoveSyncNode(const std::string& tag, |
78 sync_api::WriteTransaction* trans); | 79 sync_api::WriteTransaction* trans); |
79 | 80 |
80 // These two methods are dispatched to by Observe depending on the type. | 81 // These two methods are dispatched to by Observe depending on the type. |
81 void ObserveAutofillEntriesChanged(AutofillChangeList* changes, | 82 void ObserveAutofillEntriesChanged(AutofillChangeList* changes, |
82 sync_api::WriteTransaction* trans, | 83 sync_api::WriteTransaction* trans, |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 // in CommitChangesFromSyncModel. | 127 // in CommitChangesFromSyncModel. |
127 struct AutofillChangeRecord; | 128 struct AutofillChangeRecord; |
128 std::vector<AutofillChangeRecord> autofill_changes_; | 129 std::vector<AutofillChangeRecord> autofill_changes_; |
129 | 130 |
130 DISALLOW_COPY_AND_ASSIGN(AutofillChangeProcessor); | 131 DISALLOW_COPY_AND_ASSIGN(AutofillChangeProcessor); |
131 }; | 132 }; |
132 | 133 |
133 } // namespace browser_sync | 134 } // namespace browser_sync |
134 | 135 |
135 #endif // CHROME_BROWSER_SYNC_GLUE_AUTOFILL_CHANGE_PROCESSOR_H_ | 136 #endif // CHROME_BROWSER_SYNC_GLUE_AUTOFILL_CHANGE_PROCESSOR_H_ |
OLD | NEW |