Index: chrome/browser/component_updater/ev_whitelist_component_installer.h |
diff --git a/chrome/browser/component_updater/ev_whitelist_component_installer.h b/chrome/browser/component_updater/ev_whitelist_component_installer.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6b023dfd8ecf3b386d14bb1a488689eaddae7e18 |
--- /dev/null |
+++ b/chrome/browser/component_updater/ev_whitelist_component_installer.h |
@@ -0,0 +1,52 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_ |
+#define CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_ |
+ |
+#include <string> |
+#include <vector> |
+ |
+#include "base/files/file_path.h" |
+#include "base/values.h" |
+#include "chrome/browser/component_updater/default_component_installer.h" |
+ |
+namespace component_updater { |
+ |
+class ComponentUpdateService; |
+ |
+class EVWhitelistComponentInstallerTraits : public ComponentInstallerTraits { |
+ public: |
+ EVWhitelistComponentInstallerTraits(); |
+ virtual ~EVWhitelistComponentInstallerTraits() {} |
+ |
+ private: |
+ // The following methods override ComponentInstallerTraits. |
+ virtual bool CanAutoUpdate() const OVERRIDE; |
+ virtual bool OnCustomInstall(const base::DictionaryValue& manifest, |
+ const base::FilePath& install_dir) OVERRIDE; |
+ virtual bool VerifyInstallation( |
+ const base::FilePath& install_dir) const OVERRIDE; |
+ virtual void ComponentReady( |
+ const base::Version& version, |
+ const base::FilePath& path, |
+ scoped_ptr<base::DictionaryValue> manifest) OVERRIDE; |
+ virtual base::FilePath GetBaseDirectory() const OVERRIDE; |
+ virtual void GetHash(std::vector<uint8>* hash) const OVERRIDE; |
+ virtual std::string GetName() const OVERRIDE; |
+ |
+ static base::FilePath GetInstalledPath(const base::FilePath& base); |
+ |
+ std::string compressed_whitelist_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(EVWhitelistComponentInstallerTraits); |
+}; |
+ |
+// Call once during startup to make the component update service aware of |
+// the EV whitelist. |
+void RegisterEVWhitelistComponent(ComponentUpdateService* cus); |
+ |
+} // namespace component_updater |
+ |
+#endif // CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_ |