OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/pnacl/pnacl_component_installer.h" | 5 #include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h" |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 if (pci->updates_disabled()) | 408 if (pci->updates_disabled()) |
409 return; | 409 return; |
410 | 410 |
411 BrowserThread::PostTask( | 411 BrowserThread::PostTask( |
412 BrowserThread::UI, FROM_HERE, | 412 BrowserThread::UI, FROM_HERE, |
413 base::Bind(&FinishPnaclUpdateRegistration, version, pci)); | 413 base::Bind(&FinishPnaclUpdateRegistration, version, pci)); |
414 | 414 |
415 // Remove older versions of PNaCl. | 415 // Remove older versions of PNaCl. |
416 for (std::vector<base::FilePath>::iterator iter = older_dirs.begin(); | 416 for (std::vector<base::FilePath>::iterator iter = older_dirs.begin(); |
417 iter != older_dirs.end(); ++iter) { | 417 iter != older_dirs.end(); ++iter) { |
418 file_util::Delete(*iter, true); | 418 base::Delete(*iter, true); |
419 } | 419 } |
420 } | 420 } |
421 | 421 |
422 void GetProfileInformation(PnaclComponentInstaller* pci) { | 422 void GetProfileInformation(PnaclComponentInstaller* pci) { |
423 // Bail if not logged in yet. | 423 // Bail if not logged in yet. |
424 if (!g_browser_process->profile_manager()->IsLoggedIn()) { | 424 if (!g_browser_process->profile_manager()->IsLoggedIn()) { |
425 return; | 425 return; |
426 } | 426 } |
427 | 427 |
428 pci->OnProfileChange(); | 428 pci->OnProfileChange(); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 pnacl_component.installer = pci; | 476 pnacl_component.installer = pci; |
477 SetPnaclHash(&pnacl_component); | 477 SetPnaclHash(&pnacl_component); |
478 ComponentUpdateService::Status status = cus->CheckForUpdateSoon( | 478 ComponentUpdateService::Status status = cus->CheckForUpdateSoon( |
479 pnacl_component); | 479 pnacl_component); |
480 if (status != ComponentUpdateService::kOk) { | 480 if (status != ComponentUpdateService::kOk) { |
481 installed.Run(false); | 481 installed.Run(false); |
482 return; | 482 return; |
483 } | 483 } |
484 pci->AddInstallCallback(installed); | 484 pci->AddInstallCallback(installed); |
485 } | 485 } |
OLD | NEW |