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

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

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

Powered by Google App Engine
This is Rietveld 408576698