| 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_EXTENSIONS_CRX_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> |
| 9 | 10 |
| 10 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 11 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 12 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 14 #include "base/version.h" | 15 #include "base/version.h" |
| 15 #include "chrome/browser/extensions/blacklist.h" | 16 #include "chrome/browser/extensions/blacklist.h" |
| 16 #include "chrome/browser/extensions/extension_install_prompt.h" | 17 #include "chrome/browser/extensions/extension_install_prompt.h" |
| 17 #include "chrome/browser/extensions/extension_installer.h" | 18 #include "chrome/browser/extensions/extension_installer.h" |
| 18 #include "chrome/browser/extensions/extension_service.h" | 19 #include "chrome/browser/extensions/extension_service.h" |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 install_flags_ &= ~kInstallFlagInstallImmediately; | 190 install_flags_ &= ~kInstallFlagInstallImmediately; |
| 190 } | 191 } |
| 191 | 192 |
| 192 void set_is_ephemeral(bool val) { | 193 void set_is_ephemeral(bool val) { |
| 193 if (val) | 194 if (val) |
| 194 install_flags_ |= kInstallFlagIsEphemeral; | 195 install_flags_ |= kInstallFlagIsEphemeral; |
| 195 else | 196 else |
| 196 install_flags_ &= ~kInstallFlagIsEphemeral; | 197 install_flags_ &= ~kInstallFlagIsEphemeral; |
| 197 } | 198 } |
| 198 | 199 |
| 200 void set_install_flag(int flag, bool val) { |
| 201 if (val) |
| 202 install_flags_ |= flag; |
| 203 else |
| 204 install_flags_ &= ~flag; |
| 205 } |
| 206 |
| 199 bool did_handle_successfully() const { return did_handle_successfully_; } | 207 bool did_handle_successfully() const { return did_handle_successfully_; } |
| 200 | 208 |
| 201 Profile* profile() { return installer_.profile(); } | 209 Profile* profile() { return installer_.profile(); } |
| 202 | 210 |
| 203 const Extension* extension() { return installer_.extension().get(); } | 211 const Extension* extension() { return installer_.extension().get(); } |
| 204 | 212 |
| 205 private: | 213 private: |
| 206 friend class ::ExtensionServiceTest; | 214 friend class ::ExtensionServiceTest; |
| 207 friend class ExtensionUpdaterTest; | 215 friend class ExtensionUpdaterTest; |
| 208 friend class ExtensionCrxInstallerTest; | 216 friend class ExtensionCrxInstallerTest; |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 | 422 |
| 415 // Gives access to common methods and data of an extension installer. | 423 // Gives access to common methods and data of an extension installer. |
| 416 ExtensionInstaller installer_; | 424 ExtensionInstaller installer_; |
| 417 | 425 |
| 418 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); | 426 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); |
| 419 }; | 427 }; |
| 420 | 428 |
| 421 } // namespace extensions | 429 } // namespace extensions |
| 422 | 430 |
| 423 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ | 431 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ |
| OLD | NEW |