OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ |
6 #define CHROME_BROWSER_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ | 6 #define CHROME_BROWSER_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/version.h" | 13 #include "base/version.h" |
14 #include "chrome/browser/component_updater/component_updater_service.h" | 14 #include "chrome/browser/component_updater/component_updater_service.h" |
15 | 15 |
16 namespace base { | 16 namespace base { |
17 class DictionaryValue; | 17 class DictionaryValue; |
18 class FilePath; | 18 class FilePath; |
19 } // namespace base | 19 } // namespace base |
20 | 20 |
| 21 namespace component_updater { |
| 22 |
21 // Components should use a DefaultComponentInstaller by defining a class that | 23 // Components should use a DefaultComponentInstaller by defining a class that |
22 // implements the members of ComponentInstallerTraits, and then registering a | 24 // implements the members of ComponentInstallerTraits, and then registering a |
23 // DefaultComponentInstaller that has been constructed with an instance of that | 25 // DefaultComponentInstaller that has been constructed with an instance of that |
24 // class. | 26 // class. |
25 class ComponentInstallerTraits { | 27 class ComponentInstallerTraits { |
26 public: | 28 public: |
27 virtual ~ComponentInstallerTraits(); | 29 virtual ~ComponentInstallerTraits(); |
28 | 30 |
29 // Verifies that a working installation resides within the directory specified | 31 // Verifies that a working installation resides within the directory specified |
30 // by |dir|. |dir| is of the form <base directory>/<version>. | 32 // by |dir|. |dir| is of the form <base directory>/<version>. |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 void FinishRegistration(ComponentUpdateService* cus); | 98 void FinishRegistration(ComponentUpdateService* cus); |
97 | 99 |
98 base::Version current_version_; | 100 base::Version current_version_; |
99 std::string current_fingerprint_; | 101 std::string current_fingerprint_; |
100 scoped_ptr<base::DictionaryValue> current_manifest_; | 102 scoped_ptr<base::DictionaryValue> current_manifest_; |
101 scoped_ptr<ComponentInstallerTraits> installer_traits_; | 103 scoped_ptr<ComponentInstallerTraits> installer_traits_; |
102 | 104 |
103 DISALLOW_COPY_AND_ASSIGN(DefaultComponentInstaller); | 105 DISALLOW_COPY_AND_ASSIGN(DefaultComponentInstaller); |
104 }; | 106 }; |
105 | 107 |
| 108 } // namespace component_updater |
| 109 |
106 #endif // CHROME_BROWSER_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ | 110 #endif // CHROME_BROWSER_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ |
OLD | NEW |