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

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

Issue 897873002: Make ComponentInstaller refcounted. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@2015_01_19_component_installer
Patch Set: fix Created 5 years, 10 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
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 <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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/component_updater/pnacl/pnacl_component_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698