OLD | NEW |
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // Test if the "origin-trials" key is present in the manifest. | 58 // Test if the "origin-trials" key is present in the manifest. |
59 return manifest.HasKey(kManifestOriginTrialsKey); | 59 return manifest.HasKey(kManifestOriginTrialsKey); |
60 } | 60 } |
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 true; | 68 return false; |
69 } | 69 } |
70 | 70 |
71 bool OriginTrialsComponentInstallerTraits::OnCustomInstall( | 71 bool OriginTrialsComponentInstallerTraits::OnCustomInstall( |
72 const base::DictionaryValue& manifest, | 72 const base::DictionaryValue& manifest, |
73 const base::FilePath& install_dir) { | 73 const base::FilePath& install_dir) { |
74 return true; | 74 return true; |
75 } | 75 } |
76 | 76 |
77 void OriginTrialsComponentInstallerTraits::ComponentReady( | 77 void OriginTrialsComponentInstallerTraits::ComponentReady( |
78 const base::Version& version, | 78 const base::Version& version, |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 const base::FilePath& user_data_dir) { | 132 const base::FilePath& user_data_dir) { |
133 std::unique_ptr<ComponentInstallerTraits> traits( | 133 std::unique_ptr<ComponentInstallerTraits> traits( |
134 new OriginTrialsComponentInstallerTraits()); | 134 new OriginTrialsComponentInstallerTraits()); |
135 // |cus| will take ownership of |installer| during installer->Register(cus). | 135 // |cus| will take ownership of |installer| during installer->Register(cus). |
136 DefaultComponentInstaller* installer = | 136 DefaultComponentInstaller* installer = |
137 new DefaultComponentInstaller(std::move(traits)); | 137 new DefaultComponentInstaller(std::move(traits)); |
138 installer->Register(cus, base::Closure()); | 138 installer->Register(cus, base::Closure()); |
139 } | 139 } |
140 | 140 |
141 } // namespace component_updater | 141 } // namespace component_updater |
OLD | NEW |