| 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/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 // for now). TODO(jvoung): we need notifications if someone surfed to a | 304 // for now). TODO(jvoung): we need notifications if someone surfed to a |
| 305 // Pnacl webpage and Pnacl was just installed at this time. They should | 305 // Pnacl webpage and Pnacl was just installed at this time. They should |
| 306 // then be able to reload the page and retry (or something). | 306 // then be able to reload the page and retry (or something). |
| 307 // See: http://code.google.com/p/chromium/issues/detail?id=107438 | 307 // See: http://code.google.com/p/chromium/issues/detail?id=107438 |
| 308 set_current_version(version); | 308 set_current_version(version); |
| 309 | 309 |
| 310 PathService::Override(chrome::DIR_PNACL_COMPONENT, path); | 310 PathService::Override(chrome::DIR_PNACL_COMPONENT, path); |
| 311 return true; | 311 return true; |
| 312 } | 312 } |
| 313 | 313 |
| 314 bool PnaclComponentInstaller::GetInstalledFile( |
| 315 const std::string& file, base::FilePath* installed_file) { |
| 316 return false; |
| 317 } |
| 318 |
| 314 namespace { | 319 namespace { |
| 315 | 320 |
| 316 void DoCheckForUpdate(ComponentUpdateService* cus, | 321 void DoCheckForUpdate(ComponentUpdateService* cus, |
| 317 const CrxComponent& pnacl) { | 322 const CrxComponent& pnacl) { |
| 318 if (cus->CheckForUpdateSoon(pnacl) != ComponentUpdateService::kOk) { | 323 if (cus->CheckForUpdateSoon(pnacl) != ComponentUpdateService::kOk) { |
| 319 LOG(WARNING) << "Pnacl check for update failed."; | 324 LOG(WARNING) << "Pnacl check for update failed."; |
| 320 } | 325 } |
| 321 } | 326 } |
| 322 | 327 |
| 323 // Finally, do the registration with the right version number. | 328 // Finally, do the registration with the right version number. |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 // No need to check the commandline flags again here. | 433 // No need to check the commandline flags again here. |
| 429 // We could only have gotten here after RegisterPnaclComponent | 434 // We could only have gotten here after RegisterPnaclComponent |
| 430 // found --enable-pnacl, since that is where we create the profile_observer_, | 435 // found --enable-pnacl, since that is where we create the profile_observer_, |
| 431 // which in turn calls ReRegisterPnacl. | 436 // which in turn calls ReRegisterPnacl. |
| 432 DCHECK(per_user_); | 437 DCHECK(per_user_); |
| 433 // Figure out profile information, before proceeding to look for files. | 438 // Figure out profile information, before proceeding to look for files. |
| 434 BrowserThread::PostTask( | 439 BrowserThread::PostTask( |
| 435 BrowserThread::UI, FROM_HERE, | 440 BrowserThread::UI, FROM_HERE, |
| 436 base::Bind(&GetProfileInformation, this)); | 441 base::Bind(&GetProfileInformation, this)); |
| 437 } | 442 } |
| OLD | NEW |