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

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

Issue 2479633003: Makes the component installers return a Result instead of a bool. (Closed)
Patch Set: rebase Created 4 years, 1 month 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 <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 bool EVWhitelistComponentInstallerTraits:: 75 bool EVWhitelistComponentInstallerTraits::
76 SupportsGroupPolicyEnabledComponentUpdates() const { 76 SupportsGroupPolicyEnabledComponentUpdates() const {
77 return false; 77 return false;
78 } 78 }
79 79
80 bool EVWhitelistComponentInstallerTraits::RequiresNetworkEncryption() const { 80 bool EVWhitelistComponentInstallerTraits::RequiresNetworkEncryption() const {
81 return false; 81 return false;
82 } 82 }
83 83
84 bool EVWhitelistComponentInstallerTraits::OnCustomInstall( 84 update_client::CrxInstaller::Result
85 EVWhitelistComponentInstallerTraits::OnCustomInstall(
85 const base::DictionaryValue& manifest, 86 const base::DictionaryValue& manifest,
86 const base::FilePath& install_dir) { 87 const base::FilePath& install_dir) {
87 VLOG(1) << "Entering EVWhitelistComponentInstallerTraits::OnCustomInstall."; 88 VLOG(1) << "Entering EVWhitelistComponentInstallerTraits::OnCustomInstall.";
88 89
89 return true; // Nothing custom here. 90 return update_client::CrxInstaller::Result(0); // Nothing custom here.
90 } 91 }
91 92
92 base::FilePath EVWhitelistComponentInstallerTraits::GetInstalledPath( 93 base::FilePath EVWhitelistComponentInstallerTraits::GetInstalledPath(
93 const base::FilePath& base) { 94 const base::FilePath& base) {
94 // EV whitelist is encoded the same way for all platforms 95 // EV whitelist is encoded the same way for all platforms
95 return base.Append(FILE_PATH_LITERAL("_platform_specific")) 96 return base.Append(FILE_PATH_LITERAL("_platform_specific"))
96 .Append(FILE_PATH_LITERAL("all")) 97 .Append(FILE_PATH_LITERAL("all"))
97 .Append(kCompressedEVWhitelistFileName); 98 .Append(kCompressedEVWhitelistFileName);
98 } 99 }
99 100
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 DefaultComponentInstaller* installer = 154 DefaultComponentInstaller* installer =
154 new DefaultComponentInstaller(std::move(traits)); 155 new DefaultComponentInstaller(std::move(traits));
155 installer->Register(cus, base::Closure()); 156 installer->Register(cus, base::Closure());
156 157
157 content::BrowserThread::PostAfterStartupTask( 158 content::BrowserThread::PostAfterStartupTask(
158 FROM_HERE, content::BrowserThread::GetBlockingPool(), 159 FROM_HERE, content::BrowserThread::GetBlockingPool(),
159 base::Bind(&DeleteWhitelistCopy, user_data_dir)); 160 base::Bind(&DeleteWhitelistCopy, user_data_dir));
160 } 161 }
161 162
162 } // namespace component_updater 163 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698