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

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

Issue 2770003: Changed syncable::PASSWORD to syncable::PASSWORDS for consistency (Closed)
Patch Set: Created 10 years, 6 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
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_PASSWORD_MODEL_ASSOCIATOR_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_PASSWORD_MODEL_ASSOCIATOR_H_
6 #define CHROME_BROWSER_SYNC_GLUE_PASSWORD_MODEL_ASSOCIATOR_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_PASSWORD_MODEL_ASSOCIATOR_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // Contains all model association related logic: 43 // Contains all model association related logic:
44 // * Algorithm to associate password model and sync model. 44 // * Algorithm to associate password model and sync model.
45 // * Persisting model associations and loading them back. 45 // * Persisting model associations and loading them back.
46 // We do not check if we have local data before this runs; we always 46 // We do not check if we have local data before this runs; we always
47 // merge and sync. 47 // merge and sync.
48 class PasswordModelAssociator 48 class PasswordModelAssociator
49 : public PerDataTypeAssociatorInterface<std::string, std::string> { 49 : public PerDataTypeAssociatorInterface<std::string, std::string> {
50 public: 50 public:
51 typedef std::vector<webkit_glue::PasswordForm> PasswordVector; 51 typedef std::vector<webkit_glue::PasswordForm> PasswordVector;
52 52
53 static syncable::ModelType model_type() { return syncable::PASSWORD; } 53 static syncable::ModelType model_type() { return syncable::PASSWORDS; }
54 PasswordModelAssociator(ProfileSyncService* sync_service, 54 PasswordModelAssociator(ProfileSyncService* sync_service,
55 PasswordStore* password_store, 55 PasswordStore* password_store,
56 UnrecoverableErrorHandler* error_handler); 56 UnrecoverableErrorHandler* error_handler);
57 virtual ~PasswordModelAssociator() { } 57 virtual ~PasswordModelAssociator() { }
58 58
59 // PerDataTypeAssociatorInterface implementation. 59 // PerDataTypeAssociatorInterface implementation.
60 // 60 //
61 // Iterates through the sync model looking for matched pairs of items. 61 // Iterates through the sync model looking for matched pairs of items.
62 virtual bool AssociateModels(); 62 virtual bool AssociateModels();
63 63
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 PasswordToSyncIdMap id_map_; 150 PasswordToSyncIdMap id_map_;
151 SyncIdToPasswordMap id_map_inverse_; 151 SyncIdToPasswordMap id_map_inverse_;
152 152
153 DISALLOW_COPY_AND_ASSIGN(PasswordModelAssociator); 153 DISALLOW_COPY_AND_ASSIGN(PasswordModelAssociator);
154 }; 154 };
155 155
156 } // namespace browser_sync 156 } // namespace browser_sync
157 157
158 #endif // CHROME_BROWSER_SYNC_GLUE_PASSWORD_MODEL_ASSOCIATOR_H_ 158 #endif // CHROME_BROWSER_SYNC_GLUE_PASSWORD_MODEL_ASSOCIATOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/password_data_type_controller.h ('k') | chrome/browser/sync/glue/password_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698