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 "chrome/browser/component_updater/flash_component_installer.h" | 5 #include "chrome/browser/component_updater/flash_component_installer.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 } | 378 } |
379 } | 379 } |
380 | 380 |
381 BrowserThread::PostTask( | 381 BrowserThread::PostTask( |
382 BrowserThread::UI, FROM_HERE, | 382 BrowserThread::UI, FROM_HERE, |
383 base::Bind(&FinishPepperFlashUpdateRegistration, cus, version)); | 383 base::Bind(&FinishPepperFlashUpdateRegistration, cus, version)); |
384 | 384 |
385 // Remove older versions of Pepper Flash. | 385 // Remove older versions of Pepper Flash. |
386 for (std::vector<base::FilePath>::iterator iter = older_dirs.begin(); | 386 for (std::vector<base::FilePath>::iterator iter = older_dirs.begin(); |
387 iter != older_dirs.end(); ++iter) { | 387 iter != older_dirs.end(); ++iter) { |
388 base::Delete(*iter, true); | 388 base::DeleteFile(*iter, true); |
389 } | 389 } |
390 } | 390 } |
391 #endif // defined(GOOGLE_CHROME_BUILD) && !defined(OS_LINUX) | 391 #endif // defined(GOOGLE_CHROME_BUILD) && !defined(OS_LINUX) |
392 | 392 |
393 } // namespace | 393 } // namespace |
394 | 394 |
395 void RegisterPepperFlashComponent(ComponentUpdateService* cus) { | 395 void RegisterPepperFlashComponent(ComponentUpdateService* cus) { |
396 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_LINUX) | 396 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_LINUX) |
397 // Component updated flash supersedes bundled flash therefore if that one | 397 // Component updated flash supersedes bundled flash therefore if that one |
398 // is disabled then this one should never install. | 398 // is disabled then this one should never install. |
399 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 399 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
400 if (cmd_line->HasSwitch(switches::kDisableBundledPpapiFlash)) | 400 if (cmd_line->HasSwitch(switches::kDisableBundledPpapiFlash)) |
401 return; | 401 return; |
402 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, | 402 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, |
403 base::Bind(&StartPepperFlashUpdateRegistration, cus)); | 403 base::Bind(&StartPepperFlashUpdateRegistration, cus)); |
404 #endif | 404 #endif |
405 } | 405 } |
OLD | NEW |