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

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

Issue 18383003: Move DeleteAfterReboot and Move to base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
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 "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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 if (current_version_.CompareTo(version) > 0) 275 if (current_version_.CompareTo(version) > 0)
276 return false; 276 return false;
277 if (!file_util::PathExists(unpack_path.Append( 277 if (!file_util::PathExists(unpack_path.Append(
278 chrome::kPepperFlashPluginFilename))) 278 chrome::kPepperFlashPluginFilename)))
279 return false; 279 return false;
280 // Passed the basic tests. Time to install it. 280 // Passed the basic tests. Time to install it.
281 base::FilePath path = 281 base::FilePath path =
282 GetPepperFlashBaseDirectory().AppendASCII(version.GetString()); 282 GetPepperFlashBaseDirectory().AppendASCII(version.GetString());
283 if (file_util::PathExists(path)) 283 if (file_util::PathExists(path))
284 return false; 284 return false;
285 if (!file_util::Move(unpack_path, path)) 285 if (!base::Move(unpack_path, path))
286 return false; 286 return false;
287 // Installation is done. Now tell the rest of chrome. Both the path service 287 // Installation is done. Now tell the rest of chrome. Both the path service
288 // and to the plugin service. 288 // and to the plugin service.
289 current_version_ = version; 289 current_version_ = version;
290 PathService::Override(chrome::DIR_PEPPER_FLASH_PLUGIN, path); 290 PathService::Override(chrome::DIR_PEPPER_FLASH_PLUGIN, path);
291 path = path.Append(chrome::kPepperFlashPluginFilename); 291 path = path.Append(chrome::kPepperFlashPluginFilename);
292 BrowserThread::PostTask( 292 BrowserThread::PostTask(
293 BrowserThread::UI, FROM_HERE, 293 BrowserThread::UI, FROM_HERE,
294 base::Bind(&RegisterPepperFlashWithChrome, path, version)); 294 base::Bind(&RegisterPepperFlashWithChrome, path, version));
295 return true; 295 return true;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698