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

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

Issue 15908002: Differential updates for components. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/flash_component_installer.h" 5 #include "chrome/browser/component_updater/flash_component_installer.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 public: 242 public:
243 explicit PepperFlashComponentInstaller(const Version& version); 243 explicit PepperFlashComponentInstaller(const Version& version);
244 244
245 virtual ~PepperFlashComponentInstaller() {} 245 virtual ~PepperFlashComponentInstaller() {}
246 246
247 virtual void OnUpdateError(int error) OVERRIDE; 247 virtual void OnUpdateError(int error) OVERRIDE;
248 248
249 virtual bool Install(const base::DictionaryValue& manifest, 249 virtual bool Install(const base::DictionaryValue& manifest,
250 const base::FilePath& unpack_path) OVERRIDE; 250 const base::FilePath& unpack_path) OVERRIDE;
251 251
252 virtual bool GetInstalledFile(const std::string& file,
253 base::FilePath* installed_file) OVERRIDE;
254
252 private: 255 private:
253 Version current_version_; 256 Version current_version_;
254 }; 257 };
255 258
256 PepperFlashComponentInstaller::PepperFlashComponentInstaller( 259 PepperFlashComponentInstaller::PepperFlashComponentInstaller(
257 const Version& version) : current_version_(version) { 260 const Version& version) : current_version_(version) {
258 DCHECK(version.IsValid()); 261 DCHECK(version.IsValid());
259 } 262 }
260 263
261 void PepperFlashComponentInstaller::OnUpdateError(int error) { 264 void PepperFlashComponentInstaller::OnUpdateError(int error) {
(...skipping 22 matching lines...) Expand all
284 // and to the plugin service. 287 // and to the plugin service.
285 current_version_ = version; 288 current_version_ = version;
286 PathService::Override(chrome::DIR_PEPPER_FLASH_PLUGIN, path); 289 PathService::Override(chrome::DIR_PEPPER_FLASH_PLUGIN, path);
287 path = path.Append(chrome::kPepperFlashPluginFilename); 290 path = path.Append(chrome::kPepperFlashPluginFilename);
288 BrowserThread::PostTask( 291 BrowserThread::PostTask(
289 BrowserThread::UI, FROM_HERE, 292 BrowserThread::UI, FROM_HERE,
290 base::Bind(&RegisterPepperFlashWithChrome, path, version)); 293 base::Bind(&RegisterPepperFlashWithChrome, path, version));
291 return true; 294 return true;
292 } 295 }
293 296
297 bool PepperFlashComponentInstaller::GetInstalledFile(
298 const std::string& file, base::FilePath* installed_file) {
299 return false;
300 }
301
294 bool CheckPepperFlashManifest(const base::DictionaryValue& manifest, 302 bool CheckPepperFlashManifest(const base::DictionaryValue& manifest,
295 Version* version_out) { 303 Version* version_out) {
296 std::string name; 304 std::string name;
297 manifest.GetStringASCII("name", &name); 305 manifest.GetStringASCII("name", &name);
298 // TODO(viettrungluu): Support WinFlapper for now, while we change the format 306 // TODO(viettrungluu): Support WinFlapper for now, while we change the format
299 // of the manifest. (Should be safe to remove checks for "WinFlapper" in, say, 307 // of the manifest. (Should be safe to remove checks for "WinFlapper" in, say,
300 // Nov. 2011.) crbug.com/98458 308 // Nov. 2011.) crbug.com/98458
301 if (name != kPepperFlashManifestName && name != "WinFlapper") 309 if (name != kPepperFlashManifestName && name != "WinFlapper")
302 return false; 310 return false;
303 311
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_LINUX) 395 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_LINUX)
388 // Component updated flash supersedes bundled flash therefore if that one 396 // Component updated flash supersedes bundled flash therefore if that one
389 // is disabled then this one should never install. 397 // is disabled then this one should never install.
390 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 398 CommandLine* cmd_line = CommandLine::ForCurrentProcess();
391 if (cmd_line->HasSwitch(switches::kDisableBundledPpapiFlash)) 399 if (cmd_line->HasSwitch(switches::kDisableBundledPpapiFlash))
392 return; 400 return;
393 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 401 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
394 base::Bind(&StartPepperFlashUpdateRegistration, cus)); 402 base::Bind(&StartPepperFlashUpdateRegistration, cus));
395 #endif 403 #endif
396 } 404 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698