| OLD | NEW |
| 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_PASSWORD_MANAGER_PASSWORD_STORE_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_H_ |
| 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // TODO(scr) If we can convert vector<PasswordForm*> to | 55 // TODO(scr) If we can convert vector<PasswordForm*> to |
| 56 // ScopedVector<PasswordForm>, then we can move the following class to merely | 56 // ScopedVector<PasswordForm>, then we can move the following class to merely |
| 57 // a typedef. At the moment, a subclass of CancelableRequest1 is required to | 57 // a typedef. At the moment, a subclass of CancelableRequest1 is required to |
| 58 // provide a destructor, which cleans up after canceled requests by deleting | 58 // provide a destructor, which cleans up after canceled requests by deleting |
| 59 // vector elements. | 59 // vector elements. |
| 60 class GetLoginsRequest | 60 class GetLoginsRequest |
| 61 : public CancelableRequest1<GetLoginsCallback, | 61 : public CancelableRequest1<GetLoginsCallback, |
| 62 std::vector<webkit::forms::PasswordForm*> > { | 62 std::vector<webkit::forms::PasswordForm*> > { |
| 63 public: | 63 public: |
| 64 explicit GetLoginsRequest(const GetLoginsCallback& callback); | 64 explicit GetLoginsRequest(const GetLoginsCallback& callback); |
| 65 |
| 66 protected: |
| 65 virtual ~GetLoginsRequest(); | 67 virtual ~GetLoginsRequest(); |
| 66 | 68 |
| 67 private: | 69 private: |
| 68 DISALLOW_COPY_AND_ASSIGN(GetLoginsRequest); | 70 DISALLOW_COPY_AND_ASSIGN(GetLoginsRequest); |
| 69 }; | 71 }; |
| 70 | 72 |
| 71 // An interface used to notify clients (observers) of this object that data in | 73 // An interface used to notify clients (observers) of this object that data in |
| 72 // the password store has changed. Register the observer via | 74 // the password store has changed. Register the observer via |
| 73 // PasswordStore::SetObserver. | 75 // PasswordStore::SetObserver. |
| 74 class Observer { | 76 class Observer { |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 // may have been changed. | 212 // may have been changed. |
| 211 void NotifyLoginsChanged(); | 213 void NotifyLoginsChanged(); |
| 212 | 214 |
| 213 // The observers. | 215 // The observers. |
| 214 ObserverList<Observer> observers_; | 216 ObserverList<Observer> observers_; |
| 215 | 217 |
| 216 DISALLOW_COPY_AND_ASSIGN(PasswordStore); | 218 DISALLOW_COPY_AND_ASSIGN(PasswordStore); |
| 217 }; | 219 }; |
| 218 | 220 |
| 219 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_H_ | 221 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_H_ |
| OLD | NEW |