Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: chrome/browser/component_updater/caps_installer_win.cc

Issue 2102083002: Allow component installers to specify a map of installer attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/component_updater/ev_whitelist_component_installer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "chrome/browser/component_updater/caps_installer_win.h" 5 #include "chrome/browser/component_updater/caps_installer_win.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 101
102 void GetHash(std::vector<uint8_t>* hash) const override { 102 void GetHash(std::vector<uint8_t>* hash) const override {
103 hash->assign(kSha256Hash, 103 hash->assign(kSha256Hash,
104 kSha256Hash + arraysize(kSha256Hash)); 104 kSha256Hash + arraysize(kSha256Hash));
105 } 105 }
106 106
107 // This string is shown in chrome://components. 107 // This string is shown in chrome://components.
108 std::string GetName() const override { return "Chrome Crash Service"; } 108 std::string GetName() const override { return "Chrome Crash Service"; }
109 109
110 std::string GetAp() const override { return std::string(); } 110 update_client::InstallerAttributes GetInstallerAttributes() const override {
111 return update_client::InstallerAttributes();
112 }
111 }; 113 };
112 114
113 } // namespace 115 } // namespace
114 116
115 void RegisterCAPSComponent(ComponentUpdateService* cus) { 117 void RegisterCAPSComponent(ComponentUpdateService* cus) {
116 // The component updater takes ownership of |installer|. 118 // The component updater takes ownership of |installer|.
117 std::unique_ptr<ComponentInstallerTraits> traits(new CAPSInstallerTraits()); 119 std::unique_ptr<ComponentInstallerTraits> traits(new CAPSInstallerTraits());
118 DefaultComponentInstaller* installer = 120 DefaultComponentInstaller* installer =
119 new DefaultComponentInstaller(std::move(traits)); 121 new DefaultComponentInstaller(std::move(traits));
120 installer->Register(cus, base::Closure()); 122 installer->Register(cus, base::Closure());
121 } 123 }
122 124
123 } // namespace component_updater 125 } // namespace component_updater
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/component_updater/ev_whitelist_component_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698