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/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: Created 6 years, 5 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 public: 99 public:
100 explicit SwiftShaderComponentInstaller(const Version& version); 100 explicit SwiftShaderComponentInstaller(const Version& version);
101 101
102 virtual ~SwiftShaderComponentInstaller() {} 102 virtual ~SwiftShaderComponentInstaller() {}
103 103
104 virtual void OnUpdateError(int error) OVERRIDE; 104 virtual void OnUpdateError(int error) OVERRIDE;
105 105
106 virtual bool Install(const base::DictionaryValue& manifest, 106 virtual bool Install(const base::DictionaryValue& manifest,
107 const base::FilePath& unpack_path) OVERRIDE; 107 const base::FilePath& unpack_path) OVERRIDE;
108 108
109 virtual base::FilePath GetBackupPath() const OVERRIDE;
110
111 virtual void InstallExternally() OVERRIDE;
112
109 virtual bool GetInstalledFile(const std::string& file, 113 virtual bool GetInstalledFile(const std::string& file,
110 base::FilePath* installed_file) OVERRIDE; 114 base::FilePath* installed_file) OVERRIDE;
111 115
112 private: 116 private:
113 Version current_version_; 117 Version current_version_;
114 }; 118 };
115 119
116 SwiftShaderComponentInstaller::SwiftShaderComponentInstaller( 120 SwiftShaderComponentInstaller::SwiftShaderComponentInstaller(
117 const Version& version) 121 const Version& version)
118 : current_version_(version) { 122 : current_version_(version) {
(...skipping 29 matching lines...) Expand all
148 if (!base::Move(unpack_path, path)) 152 if (!base::Move(unpack_path, path))
149 return false; 153 return false;
150 // Installation is done. Now tell the rest of chrome. 154 // Installation is done. Now tell the rest of chrome.
151 current_version_ = version; 155 current_version_ = version;
152 BrowserThread::PostTask(BrowserThread::UI, 156 BrowserThread::PostTask(BrowserThread::UI,
153 FROM_HERE, 157 FROM_HERE,
154 base::Bind(&RegisterSwiftShaderWithChrome, path)); 158 base::Bind(&RegisterSwiftShaderWithChrome, path));
155 return true; 159 return true;
156 } 160 }
157 161
162 base::FilePath SwiftShaderComponentInstaller::GetBackupPath() const {
163 return base::FilePath();
164 }
165
166 void SwiftShaderComponentInstaller::InstallExternally() {
167 }
168
158 bool SwiftShaderComponentInstaller::GetInstalledFile( 169 bool SwiftShaderComponentInstaller::GetInstalledFile(
159 const std::string& file, 170 const std::string& file,
160 base::FilePath* installed_file) { 171 base::FilePath* installed_file) {
161 return false; 172 return false;
162 } 173 }
163 174
164 void FinishSwiftShaderUpdateRegistration(ComponentUpdateService* cus, 175 void FinishSwiftShaderUpdateRegistration(ComponentUpdateService* cus,
165 const Version& version) { 176 const Version& version) {
166 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 177 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
167 178
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 264
254 if (!cpu.has_sse2()) 265 if (!cpu.has_sse2())
255 return; 266 return;
256 BrowserThread::PostTask(BrowserThread::FILE, 267 BrowserThread::PostTask(BrowserThread::FILE,
257 FROM_HERE, 268 FROM_HERE,
258 base::Bind(&RegisterSwiftShaderPath, cus)); 269 base::Bind(&RegisterSwiftShaderPath, cus));
259 #endif 270 #endif
260 } 271 }
261 272
262 } // namespace component_updater 273 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698