| 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 | 328 |
| 329 return true; | 329 return true; |
| 330 } | 330 } |
| 331 | 331 |
| 332 } // namespace | 332 } // namespace |
| 333 | 333 |
| 334 class PepperFlashComponentInstaller : public update_client::ComponentInstaller { | 334 class PepperFlashComponentInstaller : public update_client::ComponentInstaller { |
| 335 public: | 335 public: |
| 336 explicit PepperFlashComponentInstaller(const Version& version); | 336 explicit PepperFlashComponentInstaller(const Version& version); |
| 337 | 337 |
| 338 ~PepperFlashComponentInstaller() override {} | 338 // ComponentInstaller implementation: |
| 339 | |
| 340 void OnUpdateError(int error) override; | 339 void OnUpdateError(int error) override; |
| 341 | 340 |
| 342 bool Install(const base::DictionaryValue& manifest, | 341 bool Install(const base::DictionaryValue& manifest, |
| 343 const base::FilePath& unpack_path) override; | 342 const base::FilePath& unpack_path) override; |
| 344 | 343 |
| 345 bool GetInstalledFile(const std::string& file, | 344 bool GetInstalledFile(const std::string& file, |
| 346 base::FilePath* installed_file) override; | 345 base::FilePath* installed_file) override; |
| 347 | 346 |
| 348 private: | 347 private: |
| 348 ~PepperFlashComponentInstaller() override {} |
| 349 |
| 349 Version current_version_; | 350 Version current_version_; |
| 350 }; | 351 }; |
| 351 | 352 |
| 352 PepperFlashComponentInstaller::PepperFlashComponentInstaller( | 353 PepperFlashComponentInstaller::PepperFlashComponentInstaller( |
| 353 const Version& version) | 354 const Version& version) |
| 354 : current_version_(version) { | 355 : current_version_(version) { |
| 355 DCHECK(version.IsValid()); | 356 DCHECK(version.IsValid()); |
| 356 } | 357 } |
| 357 | 358 |
| 358 void PepperFlashComponentInstaller::OnUpdateError(int error) { | 359 void PepperFlashComponentInstaller::OnUpdateError(int error) { |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); | 509 base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); |
| 509 if (cmd_line->HasSwitch(switches::kDisableBundledPpapiFlash)) | 510 if (cmd_line->HasSwitch(switches::kDisableBundledPpapiFlash)) |
| 510 return; | 511 return; |
| 511 BrowserThread::PostTask(BrowserThread::FILE, | 512 BrowserThread::PostTask(BrowserThread::FILE, |
| 512 FROM_HERE, | 513 FROM_HERE, |
| 513 base::Bind(&StartPepperFlashUpdateRegistration, cus)); | 514 base::Bind(&StartPepperFlashUpdateRegistration, cus)); |
| 514 #endif | 515 #endif |
| 515 } | 516 } |
| 516 | 517 |
| 517 } // namespace component_updater | 518 } // namespace component_updater |
| OLD | NEW |