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

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

Issue 16950028: Move file_util::Delete to the 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) 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/swiftshader_component_installer.h" 5 #include "chrome/browser/component_updater/swiftshader_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/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/cpu.h" 10 #include "base/cpu.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 UpdateChecker *update_checker = new UpdateChecker(cus); 224 UpdateChecker *update_checker = new UpdateChecker(cus);
225 GpuDataManager::GetInstance()->AddObserver(update_checker); 225 GpuDataManager::GetInstance()->AddObserver(update_checker);
226 update_checker->OnGpuInfoUpdate(); 226 update_checker->OnGpuInfoUpdate();
227 // We leak update_checker here, because it has to stick around for the life 227 // We leak update_checker here, because it has to stick around for the life
228 // of the GpuDataManager. 228 // of the GpuDataManager.
229 229
230 // Remove older versions of SwiftShader. 230 // Remove older versions of SwiftShader.
231 for (std::vector<base::FilePath>::iterator iter = older_dirs.begin(); 231 for (std::vector<base::FilePath>::iterator iter = older_dirs.begin();
232 iter != older_dirs.end(); ++iter) { 232 iter != older_dirs.end(); ++iter) {
233 file_util::Delete(*iter, true); 233 base::Delete(*iter, true);
234 } 234 }
235 } 235 }
236 236
237 void RegisterSwiftShaderComponent(ComponentUpdateService* cus) { 237 void RegisterSwiftShaderComponent(ComponentUpdateService* cus) {
238 #if defined(ENABLE_SWIFTSHADER) 238 #if defined(ENABLE_SWIFTSHADER)
239 base::CPU cpu; 239 base::CPU cpu;
240 240
241 if (!cpu.has_sse2()) 241 if (!cpu.has_sse2())
242 return; 242 return;
243 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 243 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
244 base::Bind(&RegisterSwiftShaderPath, cus)); 244 base::Bind(&RegisterSwiftShaderPath, cus));
245 #endif 245 #endif
246 } 246 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698