OLD | NEW |
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 <stdint.h> | 5 #include <stdint.h> |
6 #include <string.h> | 6 #include <string.h> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 | 337 |
338 // ComponentInstaller implementation: | 338 // ComponentInstaller implementation: |
339 void OnUpdateError(int error) override; | 339 void OnUpdateError(int error) override; |
340 | 340 |
341 bool Install(const base::DictionaryValue& manifest, | 341 bool Install(const base::DictionaryValue& manifest, |
342 const base::FilePath& unpack_path) override; | 342 const base::FilePath& unpack_path) override; |
343 | 343 |
344 bool GetInstalledFile(const std::string& file, | 344 bool GetInstalledFile(const std::string& file, |
345 base::FilePath* installed_file) override; | 345 base::FilePath* installed_file) override; |
346 | 346 |
| 347 bool Uninstall() override; |
| 348 |
347 private: | 349 private: |
348 ~PepperFlashComponentInstaller() override {} | 350 ~PepperFlashComponentInstaller() override {} |
349 | 351 |
350 Version current_version_; | 352 Version current_version_; |
351 }; | 353 }; |
352 | 354 |
353 PepperFlashComponentInstaller::PepperFlashComponentInstaller( | 355 PepperFlashComponentInstaller::PepperFlashComponentInstaller( |
354 const Version& version) | 356 const Version& version) |
355 : current_version_(version) { | 357 : current_version_(version) { |
356 DCHECK(version.IsValid()); | 358 DCHECK(version.IsValid()); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 base::Bind(&RegisterPepperFlashWithChrome, path, version, false)); | 390 base::Bind(&RegisterPepperFlashWithChrome, path, version, false)); |
389 return true; | 391 return true; |
390 } | 392 } |
391 | 393 |
392 bool PepperFlashComponentInstaller::GetInstalledFile( | 394 bool PepperFlashComponentInstaller::GetInstalledFile( |
393 const std::string& file, | 395 const std::string& file, |
394 base::FilePath* installed_file) { | 396 base::FilePath* installed_file) { |
395 return false; | 397 return false; |
396 } | 398 } |
397 | 399 |
| 400 bool PepperFlashComponentInstaller::Uninstall() { |
| 401 return false; |
| 402 } |
| 403 |
398 bool CheckPepperFlashManifest(const base::DictionaryValue& manifest, | 404 bool CheckPepperFlashManifest(const base::DictionaryValue& manifest, |
399 Version* version_out) { | 405 Version* version_out) { |
400 std::string name; | 406 std::string name; |
401 manifest.GetStringASCII("name", &name); | 407 manifest.GetStringASCII("name", &name); |
402 // TODO(viettrungluu): Support WinFlapper for now, while we change the format | 408 // TODO(viettrungluu): Support WinFlapper for now, while we change the format |
403 // of the manifest. (Should be safe to remove checks for "WinFlapper" in, say, | 409 // of the manifest. (Should be safe to remove checks for "WinFlapper" in, say, |
404 // Nov. 2011.) crbug.com/98458 | 410 // Nov. 2011.) crbug.com/98458 |
405 if (name != kPepperFlashManifestName && name != "WinFlapper") | 411 if (name != kPepperFlashManifestName && name != "WinFlapper") |
406 return false; | 412 return false; |
407 | 413 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); | 515 base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); |
510 if (cmd_line->HasSwitch(switches::kDisableBundledPpapiFlash)) | 516 if (cmd_line->HasSwitch(switches::kDisableBundledPpapiFlash)) |
511 return; | 517 return; |
512 BrowserThread::PostTask(BrowserThread::FILE, | 518 BrowserThread::PostTask(BrowserThread::FILE, |
513 FROM_HERE, | 519 FROM_HERE, |
514 base::Bind(&StartPepperFlashUpdateRegistration, cus)); | 520 base::Bind(&StartPepperFlashUpdateRegistration, cus)); |
515 #endif | 521 #endif |
516 } | 522 } |
517 | 523 |
518 } // namespace component_updater | 524 } // namespace component_updater |
OLD | NEW |