| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EXTENSION_INSTALL_CHECKER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_CHECKER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_CHECKER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_CHECKER_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 #include <vector> | 10 #include <vector> |
| 10 | 11 |
| 11 #include "base/callback.h" | 12 #include "base/callback.h" |
| 12 #include "base/macros.h" | 13 #include "base/macros.h" |
| 13 #include "base/memory/scoped_ptr.h" | |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
| 16 #include "extensions/browser/blacklist_state.h" | 16 #include "extensions/browser/blacklist_state.h" |
| 17 #include "extensions/common/extension.h" | 17 #include "extensions/common/extension.h" |
| 18 | 18 |
| 19 class Profile; | 19 class Profile; |
| 20 | 20 |
| 21 namespace extensions { | 21 namespace extensions { |
| 22 | 22 |
| 23 class RequirementsChecker; | 23 class RequirementsChecker; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 virtual void CheckBlacklistState(); | 90 virtual void CheckBlacklistState(); |
| 91 void OnBlacklistStateCheckDone(int sequence_number, BlacklistState state); | 91 void OnBlacklistStateCheckDone(int sequence_number, BlacklistState state); |
| 92 | 92 |
| 93 virtual void ResetResults(); | 93 virtual void ResetResults(); |
| 94 int current_sequence_number() const { return current_sequence_number_; } | 94 int current_sequence_number() const { return current_sequence_number_; } |
| 95 | 95 |
| 96 private: | 96 private: |
| 97 void MaybeInvokeCallback(); | 97 void MaybeInvokeCallback(); |
| 98 | 98 |
| 99 scoped_ptr<RequirementsChecker> requirements_checker_; | 99 std::unique_ptr<RequirementsChecker> requirements_checker_; |
| 100 | 100 |
| 101 // The Profile where the extension is being installed in. | 101 // The Profile where the extension is being installed in. |
| 102 Profile* profile_; | 102 Profile* profile_; |
| 103 | 103 |
| 104 // The extension to run checks for. | 104 // The extension to run checks for. |
| 105 scoped_refptr<const Extension> extension_; | 105 scoped_refptr<const Extension> extension_; |
| 106 | 106 |
| 107 // Requirement violations. | 107 // Requirement violations. |
| 108 std::vector<std::string> requirement_errors_; | 108 std::vector<std::string> requirement_errors_; |
| 109 | 109 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 127 Callback callback_; | 127 Callback callback_; |
| 128 | 128 |
| 129 base::WeakPtrFactory<ExtensionInstallChecker> weak_ptr_factory_; | 129 base::WeakPtrFactory<ExtensionInstallChecker> weak_ptr_factory_; |
| 130 | 130 |
| 131 DISALLOW_COPY_AND_ASSIGN(ExtensionInstallChecker); | 131 DISALLOW_COPY_AND_ASSIGN(ExtensionInstallChecker); |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 } // namespace extensions | 134 } // namespace extensions |
| 135 | 135 |
| 136 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_CHECKER_H_ | 136 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_CHECKER_H_ |
| OLD | NEW |