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

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

Issue 100573002: Move directory creation functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 pepflash.pk_hash.assign(kSha2Hash, &kSha2Hash[sizeof(kSha2Hash)]); 356 pepflash.pk_hash.assign(kSha2Hash, &kSha2Hash[sizeof(kSha2Hash)]);
357 if (cus->RegisterComponent(pepflash) != ComponentUpdateService::kOk) { 357 if (cus->RegisterComponent(pepflash) != ComponentUpdateService::kOk) {
358 NOTREACHED() << "Pepper Flash component registration failed."; 358 NOTREACHED() << "Pepper Flash component registration failed.";
359 } 359 }
360 } 360 }
361 361
362 void StartPepperFlashUpdateRegistration(ComponentUpdateService* cus) { 362 void StartPepperFlashUpdateRegistration(ComponentUpdateService* cus) {
363 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 363 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
364 base::FilePath path = GetPepperFlashBaseDirectory(); 364 base::FilePath path = GetPepperFlashBaseDirectory();
365 if (!base::PathExists(path)) { 365 if (!base::PathExists(path)) {
366 if (!file_util::CreateDirectory(path)) { 366 if (!base::CreateDirectory(path)) {
367 NOTREACHED() << "Could not create Pepper Flash directory."; 367 NOTREACHED() << "Could not create Pepper Flash directory.";
368 return; 368 return;
369 } 369 }
370 } 370 }
371 371
372 Version version(kNullVersion); 372 Version version(kNullVersion);
373 std::vector<base::FilePath> older_dirs; 373 std::vector<base::FilePath> older_dirs;
374 if (GetPepperFlashDirectory(&path, &version, &older_dirs)) { 374 if (GetPepperFlashDirectory(&path, &version, &older_dirs)) {
375 path = path.Append(chrome::kPepperFlashPluginFilename); 375 path = path.Append(chrome::kPepperFlashPluginFilename);
376 if (base::PathExists(path)) { 376 if (base::PathExists(path)) {
(...skipping 23 matching lines...) Expand all
400 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_LINUX) 400 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_LINUX)
401 // Component updated flash supersedes bundled flash therefore if that one 401 // Component updated flash supersedes bundled flash therefore if that one
402 // is disabled then this one should never install. 402 // is disabled then this one should never install.
403 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 403 CommandLine* cmd_line = CommandLine::ForCurrentProcess();
404 if (cmd_line->HasSwitch(switches::kDisableBundledPpapiFlash)) 404 if (cmd_line->HasSwitch(switches::kDisableBundledPpapiFlash))
405 return; 405 return;
406 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 406 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
407 base::Bind(&StartPepperFlashUpdateRegistration, cus)); 407 base::Bind(&StartPepperFlashUpdateRegistration, cus));
408 #endif 408 #endif
409 } 409 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698