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

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

Issue 1937683002: Implement support in DefaultComponentInstaller for picking up bundled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments through #35 Created 4 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ev_whitelist_component_installer.h" 5 #include "chrome/browser/component_updater/ev_whitelist_component_installer.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } 109 }
110 } 110 }
111 111
112 // Called during startup and installation before ComponentReady(). 112 // Called during startup and installation before ComponentReady().
113 bool EVWhitelistComponentInstallerTraits::VerifyInstallation( 113 bool EVWhitelistComponentInstallerTraits::VerifyInstallation(
114 const base::DictionaryValue& manifest, 114 const base::DictionaryValue& manifest,
115 const base::FilePath& install_dir) const { 115 const base::FilePath& install_dir) const {
116 return base::PathExists(GetInstalledPath(install_dir)); 116 return base::PathExists(GetInstalledPath(install_dir));
117 } 117 }
118 118
119 base::FilePath EVWhitelistComponentInstallerTraits::GetBaseDirectory() const { 119 base::FilePath EVWhitelistComponentInstallerTraits::GetRelativeInstallDir()
120 base::FilePath result; 120 const {
121 PathService::Get(DIR_COMPONENT_EV_WHITELIST, &result); 121 return base::FilePath(FILE_PATH_LITERAL("EVWhitelist"));
122 return result;
123 } 122 }
124 123
125 void EVWhitelistComponentInstallerTraits::GetHash( 124 void EVWhitelistComponentInstallerTraits::GetHash(
126 std::vector<uint8_t>* hash) const { 125 std::vector<uint8_t>* hash) const {
127 hash->assign(kPublicKeySHA256, 126 hash->assign(kPublicKeySHA256,
128 kPublicKeySHA256 + arraysize(kPublicKeySHA256)); 127 kPublicKeySHA256 + arraysize(kPublicKeySHA256));
129 } 128 }
130 129
131 std::string EVWhitelistComponentInstallerTraits::GetName() const { 130 std::string EVWhitelistComponentInstallerTraits::GetName() const {
132 return kEVWhitelistManifestName; 131 return kEVWhitelistManifestName;
(...skipping 13 matching lines...) Expand all
146 DefaultComponentInstaller* installer = 145 DefaultComponentInstaller* installer =
147 new DefaultComponentInstaller(std::move(traits)); 146 new DefaultComponentInstaller(std::move(traits));
148 installer->Register(cus, base::Closure()); 147 installer->Register(cus, base::Closure());
149 148
150 content::BrowserThread::PostAfterStartupTask( 149 content::BrowserThread::PostAfterStartupTask(
151 FROM_HERE, content::BrowserThread::GetBlockingPool(), 150 FROM_HERE, content::BrowserThread::GetBlockingPool(),
152 base::Bind(&DeleteWhitelistCopy, user_data_dir)); 151 base::Bind(&DeleteWhitelistCopy, user_data_dir));
153 } 152 }
154 153
155 } // namespace component_updater 154 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698