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

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

Issue 10696087: [Sync] Move ModelType and related classes to 'syncer' namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sort headers, update copyrights 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 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 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 29 matching lines...) Expand all
40 // Contains all model association related logic: 40 // Contains all model association related logic:
41 // * Algorithm to associate password model and sync model. 41 // * Algorithm to associate password model and sync model.
42 // * Persisting model associations and loading them back. 42 // * Persisting model associations and loading them back.
43 // We do not check if we have local data before this runs; we always 43 // We do not check if we have local data before this runs; we always
44 // merge and sync. 44 // merge and sync.
45 class PasswordModelAssociator 45 class PasswordModelAssociator
46 : public PerDataTypeAssociatorInterface<std::string, std::string> { 46 : public PerDataTypeAssociatorInterface<std::string, std::string> {
47 public: 47 public:
48 typedef std::vector<webkit::forms::PasswordForm> PasswordVector; 48 typedef std::vector<webkit::forms::PasswordForm> PasswordVector;
49 49
50 static syncable::ModelType model_type() { return syncable::PASSWORDS; } 50 static syncer::ModelType model_type() { return syncer::PASSWORDS; }
51 PasswordModelAssociator(ProfileSyncService* sync_service, 51 PasswordModelAssociator(ProfileSyncService* sync_service,
52 PasswordStore* password_store, 52 PasswordStore* password_store,
53 DataTypeErrorHandler* error_handler); 53 DataTypeErrorHandler* error_handler);
54 virtual ~PasswordModelAssociator(); 54 virtual ~PasswordModelAssociator();
55 55
56 // PerDataTypeAssociatorInterface implementation. 56 // PerDataTypeAssociatorInterface implementation.
57 // 57 //
58 // Iterates through the sync model looking for matched pairs of items. 58 // Iterates through the sync model looking for matched pairs of items.
59 virtual syncer::SyncError AssociateModels() OVERRIDE; 59 virtual syncer::SyncError AssociateModels() OVERRIDE;
60 60
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 PasswordToSyncIdMap id_map_; 139 PasswordToSyncIdMap id_map_;
140 SyncIdToPasswordMap id_map_inverse_; 140 SyncIdToPasswordMap id_map_inverse_;
141 DataTypeErrorHandler* error_handler_; 141 DataTypeErrorHandler* error_handler_;
142 142
143 DISALLOW_COPY_AND_ASSIGN(PasswordModelAssociator); 143 DISALLOW_COPY_AND_ASSIGN(PasswordModelAssociator);
144 }; 144 };
145 145
146 } // namespace browser_sync 146 } // namespace browser_sync
147 147
148 #endif // CHROME_BROWSER_SYNC_GLUE_PASSWORD_MODEL_ASSOCIATOR_H_ 148 #endif // CHROME_BROWSER_SYNC_GLUE_PASSWORD_MODEL_ASSOCIATOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/password_data_type_controller.cc ('k') | chrome/browser/sync/glue/password_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698