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

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

Issue 8341094: Changed change processors to use ScopedStopObserving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unnecessary call to StartObserving(). Created 9 years, 1 month 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_GLUE_PASSWORD_CHANGE_PROCESSOR_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_PASSWORD_CHANGE_PROCESSOR_H_
6 #define CHROME_BROWSER_SYNC_GLUE_PASSWORD_CHANGE_PROCESSOR_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_PASSWORD_CHANGE_PROCESSOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/sync/glue/change_processor.h" 9 #include "chrome/browser/sync/glue/change_processor.h"
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // password store only after the sync_api transaction is released, else there 51 // password store only after the sync_api transaction is released, else there
52 // is risk of deadlock due to the password store posting tasks to the UI 52 // is risk of deadlock due to the password store posting tasks to the UI
53 // thread (http://crbug.com/70658). 53 // thread (http://crbug.com/70658).
54 virtual void CommitChangesFromSyncModel() OVERRIDE; 54 virtual void CommitChangesFromSyncModel() OVERRIDE;
55 55
56 protected: 56 protected:
57 virtual void StartImpl(Profile* profile) OVERRIDE; 57 virtual void StartImpl(Profile* profile) OVERRIDE;
58 virtual void StopImpl() OVERRIDE; 58 virtual void StopImpl() OVERRIDE;
59 59
60 private: 60 private:
61 friend class ScopedStopObserving<PasswordChangeProcessor>;
61 void StartObserving(); 62 void StartObserving();
62 void StopObserving(); 63 void StopObserving();
63 64
64 // The two models should be associated according to this ModelAssociator. 65 // The two models should be associated according to this ModelAssociator.
65 PasswordModelAssociator* model_associator_; 66 PasswordModelAssociator* model_associator_;
66 67
67 // The model we are processing changes from. This is owned by the 68 // The model we are processing changes from. This is owned by the
68 // WebDataService which is kept alive by our data type controller 69 // WebDataService which is kept alive by our data type controller
69 // holding a reference. 70 // holding a reference.
70 PasswordStore* password_store_; 71 PasswordStore* password_store_;
71 72
72 // Buffers used between ApplyChangesFromSyncModel and 73 // Buffers used between ApplyChangesFromSyncModel and
73 // CommitChangesFromSyncModel. 74 // CommitChangesFromSyncModel.
74 PasswordModelAssociator::PasswordVector new_passwords_; 75 PasswordModelAssociator::PasswordVector new_passwords_;
75 PasswordModelAssociator::PasswordVector updated_passwords_; 76 PasswordModelAssociator::PasswordVector updated_passwords_;
76 PasswordModelAssociator::PasswordVector deleted_passwords_; 77 PasswordModelAssociator::PasswordVector deleted_passwords_;
77 78
78 content::NotificationRegistrar notification_registrar_; 79 content::NotificationRegistrar notification_registrar_;
79 80
80 bool observing_; 81 bool observing_;
81 82
82 MessageLoop* expected_loop_; 83 MessageLoop* expected_loop_;
83 84
84 DISALLOW_COPY_AND_ASSIGN(PasswordChangeProcessor); 85 DISALLOW_COPY_AND_ASSIGN(PasswordChangeProcessor);
85 }; 86 };
86 87
87 } // namespace browser_sync 88 } // namespace browser_sync
88 89
89 #endif // CHROME_BROWSER_SYNC_GLUE_PASSWORD_CHANGE_PROCESSOR_H_ 90 #endif // CHROME_BROWSER_SYNC_GLUE_PASSWORD_CHANGE_PROCESSOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/autofill_change_processor.cc ('k') | chrome/browser/sync/glue/password_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698