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 <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/atomicops.h" | 10 #include "base/atomicops.h" |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
365 ++iter) { | 365 ++iter) { |
366 base::DeleteFile(*iter, true); | 366 base::DeleteFile(*iter, true); |
367 } | 367 } |
368 } | 368 } |
369 | 369 |
370 } // namespace | 370 } // namespace |
371 | 371 |
372 void PnaclComponentInstaller::RegisterPnaclComponent( | 372 void PnaclComponentInstaller::RegisterPnaclComponent( |
373 ComponentUpdateService* cus, | 373 ComponentUpdateService* cus, |
374 const CommandLine& command_line) { | 374 const CommandLine& command_line) { |
375 #if defined(DISABLE_NACL) | |
376 updates_disabled_ = true; | |
377 #else | |
375 // Register PNaCl by default (can be disabled). | 378 // Register PNaCl by default (can be disabled). |
376 updates_disabled_ = command_line.HasSwitch(switches::kDisablePnaclInstall); | 379 updates_disabled_ = command_line.HasSwitch(switches::kDisablePnaclInstall); |
Lei Zhang
2014/07/17 05:33:47
There's another CL to remove this.
tzik
2014/07/17 05:53:31
Oh, sounds nice.
Droped from this CL.
| |
380 #endif | |
377 cus_ = cus; | 381 cus_ = cus; |
378 BrowserThread::PostTask(BrowserThread::FILE, | 382 BrowserThread::PostTask(BrowserThread::FILE, |
379 FROM_HERE, | 383 FROM_HERE, |
380 base::Bind(&StartPnaclUpdateRegistration, this)); | 384 base::Bind(&StartPnaclUpdateRegistration, this)); |
381 } | 385 } |
382 | 386 |
383 } // namespace component_updater | 387 } // namespace component_updater |
384 | 388 |
385 namespace pnacl { | 389 namespace pnacl { |
386 | 390 |
387 bool NeedsOnDemandUpdate() { | 391 bool NeedsOnDemandUpdate() { |
388 return base::subtle::NoBarrier_Load( | 392 return base::subtle::NoBarrier_Load( |
389 &component_updater::needs_on_demand_update) != 0; | 393 &component_updater::needs_on_demand_update) != 0; |
390 } | 394 } |
391 | 395 |
392 } // namespace pnacl | 396 } // namespace pnacl |
OLD | NEW |