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

Side by Side Diff: chrome/browser/sync/glue/autofill_profile_model_associator.h

Issue 6375007: [Sync] Refactored ProfileSyncService and remove its backend() function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows compile failure Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_PROFILE_MODEL_ASSOCIATOR_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_MODEL_ASSOCIATOR_H_
6 #define CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_MODEL_ASSOCIATOR_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_MODEL_ASSOCIATOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 // Remove the association that corresponds to the given sync id. 87 // Remove the association that corresponds to the given sync id.
88 virtual void Disassociate(int64 sync_id); 88 virtual void Disassociate(int64 sync_id);
89 89
90 // TODO(lipalani) Bug 64111. Returns whether a node with the 90 // TODO(lipalani) Bug 64111. Returns whether a node with the
91 // given permanent tag was found and update 91 // given permanent tag was found and update
92 // |sync_id| with that node's id. No current use. To Implement 92 // |sync_id| with that node's id. No current use. To Implement
93 // only for completeness. 93 // only for completeness.
94 virtual bool GetSyncIdForTaggedNode(const std::string& tag, int64* sync_id); 94 virtual bool GetSyncIdForTaggedNode(const std::string& tag, int64* sync_id);
95 95
96 // Returns sync service instance.
97 ProfileSyncService* sync_service() { return sync_service_; }
98
99 static bool OverwriteProfileWithServerData( 96 static bool OverwriteProfileWithServerData(
100 AutoFillProfile* merge_into, 97 AutoFillProfile* merge_into,
101 const sync_pb::AutofillProfileSpecifics& specifics); 98 const sync_pb::AutofillProfileSpecifics& specifics);
102 99
103 protected: 100 protected:
104 AutofillProfileModelAssociator(); 101 AutofillProfileModelAssociator();
105 bool TraverseAndAssociateChromeAutoFillProfiles( 102 bool TraverseAndAssociateChromeAutoFillProfiles(
106 sync_api::WriteTransaction* write_trans, 103 sync_api::WriteTransaction* write_trans,
107 const sync_api::ReadNode& autofill_root, 104 const sync_api::ReadNode& autofill_root,
108 const std::vector<AutoFillProfile*>& all_profiles_from_db, 105 const std::vector<AutoFillProfile*>& all_profiles_from_db,
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 std::vector<std::string> profiles_to_delete; 185 std::vector<std::string> profiles_to_delete;
189 std::vector<AutoFillProfile*> updated_profiles; 186 std::vector<AutoFillProfile*> updated_profiles;
190 std::vector<AutoFillProfile*> new_profiles; // We own these pointers. 187 std::vector<AutoFillProfile*> new_profiles; // We own these pointers.
191 ~DataBundle() { STLDeleteElements(&new_profiles); } 188 ~DataBundle() { STLDeleteElements(&new_profiles); }
192 }; 189 };
193 190
194 } // namespace browser_sync 191 } // namespace browser_sync
195 192
196 #endif // CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_MODEL_ASSOCIATOR_H_ 193 #endif // CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_MODEL_ASSOCIATOR_H_
197 194
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698