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

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

Issue 2483513002: Revert of Makes the component installers return a Result instead of a bool. (Closed)
Patch Set: 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/origin_trials_component_installer.h" 5 #include "chrome/browser/component_updater/origin_trials_component_installer.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 bool OriginTrialsComponentInstallerTraits:: 62 bool OriginTrialsComponentInstallerTraits::
63 SupportsGroupPolicyEnabledComponentUpdates() const { 63 SupportsGroupPolicyEnabledComponentUpdates() const {
64 return false; 64 return false;
65 } 65 }
66 66
67 bool OriginTrialsComponentInstallerTraits::RequiresNetworkEncryption() const { 67 bool OriginTrialsComponentInstallerTraits::RequiresNetworkEncryption() const {
68 return false; 68 return false;
69 } 69 }
70 70
71 update_client::CrxInstaller::Result 71 bool OriginTrialsComponentInstallerTraits::OnCustomInstall(
72 OriginTrialsComponentInstallerTraits::OnCustomInstall(
73 const base::DictionaryValue& manifest, 72 const base::DictionaryValue& manifest,
74 const base::FilePath& install_dir) { 73 const base::FilePath& install_dir) {
75 return update_client::CrxInstaller::Result(0); 74 return true;
76 } 75 }
77 76
78 void OriginTrialsComponentInstallerTraits::ComponentReady( 77 void OriginTrialsComponentInstallerTraits::ComponentReady(
79 const base::Version& version, 78 const base::Version& version,
80 const base::FilePath& install_dir, 79 const base::FilePath& install_dir,
81 std::unique_ptr<base::DictionaryValue> manifest) { 80 std::unique_ptr<base::DictionaryValue> manifest) {
82 // Read the configuration from the manifest and set values in browser 81 // Read the configuration from the manifest and set values in browser
83 // local_state. These will be used on the next browser restart. 82 // local_state. These will be used on the next browser restart.
84 // If an individual configuration value is missing, treat as a reset to the 83 // If an individual configuration value is missing, treat as a reset to the
85 // browser defaults. 84 // browser defaults.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 const base::FilePath& user_data_dir) { 132 const base::FilePath& user_data_dir) {
134 std::unique_ptr<ComponentInstallerTraits> traits( 133 std::unique_ptr<ComponentInstallerTraits> traits(
135 new OriginTrialsComponentInstallerTraits()); 134 new OriginTrialsComponentInstallerTraits());
136 // |cus| will take ownership of |installer| during installer->Register(cus). 135 // |cus| will take ownership of |installer| during installer->Register(cus).
137 DefaultComponentInstaller* installer = 136 DefaultComponentInstaller* installer =
138 new DefaultComponentInstaller(std::move(traits)); 137 new DefaultComponentInstaller(std::move(traits));
139 installer->Register(cus, base::Closure()); 138 installer->Register(cus, base::Closure());
140 } 139 }
141 140
142 } // namespace component_updater 141 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698