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

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

Issue 18332014: Move Copy* into the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: windows 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/widevine_cdm_component_installer.h" 5 #include "chrome/browser/component_updater/widevine_cdm_component_installer.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // Passed the basic tests. Time to install it. 232 // Passed the basic tests. Time to install it.
233 base::FilePath install_path = 233 base::FilePath install_path =
234 GetWidevineCdmBaseDirectory().AppendASCII(version.GetString()); 234 GetWidevineCdmBaseDirectory().AppendASCII(version.GetString());
235 if (file_util::PathExists(install_path)) 235 if (file_util::PathExists(install_path))
236 return false; 236 return false;
237 if (!base::Move(unpack_path, install_path)) 237 if (!base::Move(unpack_path, install_path))
238 return false; 238 return false;
239 239
240 base::FilePath adapter_install_path = 240 base::FilePath adapter_install_path =
241 install_path.AppendASCII(kWidevineCdmAdapterFileName); 241 install_path.AppendASCII(kWidevineCdmAdapterFileName);
242 if (!file_util::CopyFile(adapter_source_path, adapter_install_path)) 242 if (!base::CopyFile(adapter_source_path, adapter_install_path))
243 return false; 243 return false;
244 244
245 // Installation is done. Now register the Widevine CDM with chrome. 245 // Installation is done. Now register the Widevine CDM with chrome.
246 current_version_ = version; 246 current_version_ = version;
247 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, base::Bind( 247 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, base::Bind(
248 &RegisterWidevineCdmWithChrome, adapter_install_path, version)); 248 &RegisterWidevineCdmWithChrome, adapter_install_path, version));
249 return true; 249 return true;
250 } 250 }
251 251
252 bool WidevineCdmComponentInstaller::GetInstalledFile( 252 bool WidevineCdmComponentInstaller::GetInstalledFile(
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT) 321 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT)
322 322
323 } // namespace 323 } // namespace
324 324
325 void RegisterWidevineCdmComponent(ComponentUpdateService* cus) { 325 void RegisterWidevineCdmComponent(ComponentUpdateService* cus) {
326 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT) 326 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT)
327 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 327 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
328 base::Bind(&StartWidevineCdmUpdateRegistration, cus)); 328 base::Bind(&StartWidevineCdmUpdateRegistration, cus));
329 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT) 329 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT)
330 } 330 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698