| 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_UNPACKED_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 | 14 |
| 15 class Extension; | |
| 16 class ExtensionService; | 15 class ExtensionService; |
| 17 | 16 |
| 18 namespace extensions { | 17 namespace extensions { |
| 19 | 18 |
| 19 class Extension; |
| 20 |
| 20 // Installs and loads an unpacked extension. | 21 // Installs and loads an unpacked extension. |
| 21 // TODO(erikkay): It might be useful to be able to load a packed extension | 22 // TODO(erikkay): It might be useful to be able to load a packed extension |
| 22 // (presumably into memory) without installing it. | 23 // (presumably into memory) without installing it. |
| 23 class UnpackedInstaller | 24 class UnpackedInstaller |
| 24 : public base::RefCountedThreadSafe<UnpackedInstaller> { | 25 : public base::RefCountedThreadSafe<UnpackedInstaller> { |
| 25 public: | 26 public: |
| 26 static scoped_refptr<UnpackedInstaller> Create( | 27 static scoped_refptr<UnpackedInstaller> Create( |
| 27 ExtensionService* extension_service); | 28 ExtensionService* extension_service); |
| 28 | 29 |
| 29 // Loads the extension from the directory |extension_path|, which is | 30 // Loads the extension from the directory |extension_path|, which is |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // If true and the extension contains plugins, we prompt the user before | 77 // If true and the extension contains plugins, we prompt the user before |
| 77 // loading. | 78 // loading. |
| 78 bool prompt_for_plugins_; | 79 bool prompt_for_plugins_; |
| 79 | 80 |
| 80 DISALLOW_COPY_AND_ASSIGN(UnpackedInstaller); | 81 DISALLOW_COPY_AND_ASSIGN(UnpackedInstaller); |
| 81 }; | 82 }; |
| 82 | 83 |
| 83 } // namespace extensions | 84 } // namespace extensions |
| 84 | 85 |
| 85 #endif // CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ | 86 #endif // CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ |
| OLD | NEW |