| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_EXTENSIONS_API_PASSWORDS_PRIVATE_PASSWORDS_PRIVATE_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_PASSWORDS_PRIVATE_PASSWORDS_PRIVATE_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_PASSWORDS_PRIVATE_PASSWORDS_PRIVATE_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_PASSWORDS_PRIVATE_PASSWORDS_PRIVATE_API_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 DECLARE_EXTENSION_FUNCTION("passwordsPrivate.getSavedPasswordList", | 72 DECLARE_EXTENSION_FUNCTION("passwordsPrivate.getSavedPasswordList", |
| 73 PASSWORDSPRIVATE_GETSAVEDPASSWORDLIST); | 73 PASSWORDSPRIVATE_GETSAVEDPASSWORDLIST); |
| 74 | 74 |
| 75 protected: | 75 protected: |
| 76 ~PasswordsPrivateGetSavedPasswordListFunction() override; | 76 ~PasswordsPrivateGetSavedPasswordListFunction() override; |
| 77 | 77 |
| 78 // ExtensionFunction overrides. | 78 // ExtensionFunction overrides. |
| 79 ResponseAction Run() override; | 79 ResponseAction Run() override; |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 void GetList(); |
| 83 void GotList(const PasswordsPrivateDelegate::UiEntries& entries); |
| 84 |
| 82 DISALLOW_COPY_AND_ASSIGN(PasswordsPrivateGetSavedPasswordListFunction); | 85 DISALLOW_COPY_AND_ASSIGN(PasswordsPrivateGetSavedPasswordListFunction); |
| 83 }; | 86 }; |
| 84 | 87 |
| 85 class PasswordsPrivateGetPasswordExceptionListFunction | 88 class PasswordsPrivateGetPasswordExceptionListFunction |
| 86 : public UIThreadExtensionFunction { | 89 : public UIThreadExtensionFunction { |
| 87 public: | 90 public: |
| 88 PasswordsPrivateGetPasswordExceptionListFunction() {} | 91 PasswordsPrivateGetPasswordExceptionListFunction() {} |
| 89 DECLARE_EXTENSION_FUNCTION("passwordsPrivate.getPasswordExceptionList", | 92 DECLARE_EXTENSION_FUNCTION("passwordsPrivate.getPasswordExceptionList", |
| 90 PASSWORDSPRIVATE_GETPASSWORDEXCEPTIONLIST); | 93 PASSWORDSPRIVATE_GETPASSWORDEXCEPTIONLIST); |
| 91 | 94 |
| 92 protected: | 95 protected: |
| 93 ~PasswordsPrivateGetPasswordExceptionListFunction() override; | 96 ~PasswordsPrivateGetPasswordExceptionListFunction() override; |
| 94 | 97 |
| 95 // ExtensionFunction overrides. | 98 // ExtensionFunction overrides. |
| 96 ResponseAction Run() override; | 99 ResponseAction Run() override; |
| 97 | 100 |
| 98 private: | 101 private: |
| 102 void GetList(); |
| 103 void GotList(const PasswordsPrivateDelegate::ExceptionPairs& pairs); |
| 104 |
| 99 DISALLOW_COPY_AND_ASSIGN(PasswordsPrivateGetPasswordExceptionListFunction); | 105 DISALLOW_COPY_AND_ASSIGN(PasswordsPrivateGetPasswordExceptionListFunction); |
| 100 }; | 106 }; |
| 101 | 107 |
| 102 } // namespace extensions | 108 } // namespace extensions |
| 103 | 109 |
| 104 #endif // CHROME_BROWSER_EXTENSIONS_API_PASSWORDS_PRIVATE_PASSWORDS_PRIVATE_API
_H_ | 110 #endif // CHROME_BROWSER_EXTENSIONS_API_PASSWORDS_PRIVATE_PASSWORDS_PRIVATE_API
_H_ |
| OLD | NEW |