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

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

Issue 321473003: Elevated install of recovery component (component update part) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial upload Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/swiftshader_component_installer.h" 5 #include "chrome/browser/component_updater/swiftshader_component_installer.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 public: 101 public:
102 explicit SwiftShaderComponentInstaller(const Version& version); 102 explicit SwiftShaderComponentInstaller(const Version& version);
103 103
104 virtual ~SwiftShaderComponentInstaller() {} 104 virtual ~SwiftShaderComponentInstaller() {}
105 105
106 virtual void OnUpdateError(int error) OVERRIDE; 106 virtual void OnUpdateError(int error) OVERRIDE;
107 107
108 virtual bool Install(const base::DictionaryValue& manifest, 108 virtual bool Install(const base::DictionaryValue& manifest,
109 const base::FilePath& unpack_path) OVERRIDE; 109 const base::FilePath& unpack_path) OVERRIDE;
110 110
111 virtual void OnInstallError(
112 const InstallerSourceSerializer& serializer) OVERRIDE;
113
111 virtual bool GetInstalledFile(const std::string& file, 114 virtual bool GetInstalledFile(const std::string& file,
112 base::FilePath* installed_file) OVERRIDE; 115 base::FilePath* installed_file) OVERRIDE;
113 116
114 private: 117 private:
115 Version current_version_; 118 Version current_version_;
116 }; 119 };
117 120
118 SwiftShaderComponentInstaller::SwiftShaderComponentInstaller( 121 SwiftShaderComponentInstaller::SwiftShaderComponentInstaller(
119 const Version& version) 122 const Version& version)
120 : current_version_(version) { 123 : current_version_(version) {
(...skipping 29 matching lines...) Expand all
150 if (!base::Move(unpack_path, path)) 153 if (!base::Move(unpack_path, path))
151 return false; 154 return false;
152 // Installation is done. Now tell the rest of chrome. 155 // Installation is done. Now tell the rest of chrome.
153 current_version_ = version; 156 current_version_ = version;
154 BrowserThread::PostTask(BrowserThread::UI, 157 BrowserThread::PostTask(BrowserThread::UI,
155 FROM_HERE, 158 FROM_HERE,
156 base::Bind(&RegisterSwiftShaderWithChrome, path)); 159 base::Bind(&RegisterSwiftShaderWithChrome, path));
157 return true; 160 return true;
158 } 161 }
159 162
163 void SwiftShaderComponentInstaller::OnInstallError(
164 const InstallerSourceSerializer& serializer) {
165 }
166
160 bool SwiftShaderComponentInstaller::GetInstalledFile( 167 bool SwiftShaderComponentInstaller::GetInstalledFile(
161 const std::string& file, 168 const std::string& file,
162 base::FilePath* installed_file) { 169 base::FilePath* installed_file) {
163 return false; 170 return false;
164 } 171 }
165 172
166 void FinishSwiftShaderUpdateRegistration(ComponentUpdateService* cus, 173 void FinishSwiftShaderUpdateRegistration(ComponentUpdateService* cus,
167 const Version& version) { 174 const Version& version) {
168 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 175 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
169 176
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 262
256 if (!cpu.has_sse2()) 263 if (!cpu.has_sse2())
257 return; 264 return;
258 BrowserThread::PostTask(BrowserThread::FILE, 265 BrowserThread::PostTask(BrowserThread::FILE,
259 FROM_HERE, 266 FROM_HERE,
260 base::Bind(&RegisterSwiftShaderPath, cus)); 267 base::Bind(&RegisterSwiftShaderPath, cus));
261 #endif 268 #endif
262 } 269 }
263 270
264 } // namespace component_updater 271 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698