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

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

Issue 1872053002: Implement an API to allow passing an "ap" parameter to component updates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/cld_component_installer.h" 5 #include "chrome/browser/component_updater/cld_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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 void CldComponentInstallerTraits::GetHash(std::vector<uint8_t>* hash) const { 107 void CldComponentInstallerTraits::GetHash(std::vector<uint8_t>* hash) const {
108 hash->assign(kPublicKeySHA256, 108 hash->assign(kPublicKeySHA256,
109 kPublicKeySHA256 + arraysize(kPublicKeySHA256)); 109 kPublicKeySHA256 + arraysize(kPublicKeySHA256));
110 } 110 }
111 111
112 std::string CldComponentInstallerTraits::GetName() const { 112 std::string CldComponentInstallerTraits::GetName() const {
113 return kCldManifestName; 113 return kCldManifestName;
114 } 114 }
115 115
116 std::string CldComponentInstallerTraits::GetAp() const {
117 return std::string();
118 }
119
116 // static 120 // static
117 void RegisterCldComponent(ComponentUpdateService* cus) { 121 void RegisterCldComponent(ComponentUpdateService* cus) {
118 if (!translate::CldDataSource::IsUsingComponentDataSource()) { 122 if (!translate::CldDataSource::IsUsingComponentDataSource()) {
119 // The configured CLD data source isn't the "Component" data source, so 123 // The configured CLD data source isn't the "Component" data source, so
120 // there is nothing to do. 124 // there is nothing to do.
121 return; 125 return;
122 } 126 }
123 127
124 // This log line is to help with determining which kind of provider has been 128 // This log line is to help with determining which kind of provider has been
125 // configured. See also: chrome://translate-internals 129 // configured. See also: chrome://translate-internals
(...skipping 12 matching lines...) Expand all
138 VLOG(1) << "Setting CLD data file location: " << path.value(); 142 VLOG(1) << "Setting CLD data file location: " << path.value();
139 g_latest_cld_data_file.Get() = path; 143 g_latest_cld_data_file.Get() = path;
140 translate::CldDataSource::Get()->SetCldDataFilePath(path); 144 translate::CldDataSource::Get()->SetCldDataFilePath(path);
141 } 145 }
142 146
143 base::FilePath CldComponentInstallerTraits::GetLatestCldDataFile() { 147 base::FilePath CldComponentInstallerTraits::GetLatestCldDataFile() {
144 return g_latest_cld_data_file.Get(); 148 return g_latest_cld_data_file.Get();
145 } 149 }
146 150
147 } // namespace component_updater 151 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698