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

Side by Side Diff: chrome/common/chrome_paths.cc

Issue 772043004: Replace WIDEVINE_CDM_AVAILABLE with a gyp define 'enable_widevine_cdm'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix #endif Created 6 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
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/common/chrome_paths.h" 5 #include "chrome/common/chrome_paths.h"
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/bundle_locations.h" 10 #include "base/mac/bundle_locations.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 if (!PathService::Get(base::DIR_MODULE, &cur)) 353 if (!PathService::Get(base::DIR_MODULE, &cur))
354 return false; 354 return false;
355 cur = cur.Append(kO1DPluginFileName); 355 cur = cur.Append(kO1DPluginFileName);
356 break; 356 break;
357 case chrome::FILE_GTALK_PLUGIN: 357 case chrome::FILE_GTALK_PLUGIN:
358 if (!PathService::Get(base::DIR_MODULE, &cur)) 358 if (!PathService::Get(base::DIR_MODULE, &cur))
359 return false; 359 return false;
360 cur = cur.Append(kGTalkPluginFileName); 360 cur = cur.Append(kGTalkPluginFileName);
361 break; 361 break;
362 #endif 362 #endif
363 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) 363 #if defined(ENABLE_WIDEVINE_CDM) && defined(ENABLE_PEPPER_CDMS)
364 #if defined(WIDEVINE_CDM_IS_COMPONENT) 364 #if defined(WIDEVINE_CDM_IS_COMPONENT)
365 case chrome::DIR_COMPONENT_WIDEVINE_CDM: 365 case chrome::DIR_COMPONENT_WIDEVINE_CDM:
366 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 366 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
367 return false; 367 return false;
368 cur = cur.Append(kWidevineCdmBaseDirectory); 368 cur = cur.Append(kWidevineCdmBaseDirectory);
369 break; 369 break;
370 #endif // defined(WIDEVINE_CDM_IS_COMPONENT) 370 #endif // defined(WIDEVINE_CDM_IS_COMPONENT)
371 // TODO(xhwang): FILE_WIDEVINE_CDM_ADAPTER has different meanings. 371 // TODO(xhwang): FILE_WIDEVINE_CDM_ADAPTER has different meanings.
372 // In the component case, this is the source adapter. Otherwise, it is the 372 // In the component case, this is the source adapter. Otherwise, it is the
373 // actual Pepper module that gets loaded. 373 // actual Pepper module that gets loaded.
374 case chrome::FILE_WIDEVINE_CDM_ADAPTER: 374 case chrome::FILE_WIDEVINE_CDM_ADAPTER:
375 if (!GetInternalPluginsDirectory(&cur)) 375 if (!GetInternalPluginsDirectory(&cur))
376 return false; 376 return false;
377 cur = cur.AppendASCII(kWidevineCdmAdapterFileName); 377 cur = cur.AppendASCII(kWidevineCdmAdapterFileName);
378 break; 378 break;
379 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) 379 #endif // defined(ENABLE_WIDEVINE_CDM) && defined(ENABLE_PEPPER_CDMS)
380 case chrome::FILE_RESOURCES_PACK: 380 case chrome::FILE_RESOURCES_PACK:
381 #if defined(OS_MACOSX) && !defined(OS_IOS) 381 #if defined(OS_MACOSX) && !defined(OS_IOS)
382 if (base::mac::AmIBundled()) { 382 if (base::mac::AmIBundled()) {
383 cur = base::mac::FrameworkBundlePath(); 383 cur = base::mac::FrameworkBundlePath();
384 cur = cur.Append(FILE_PATH_LITERAL("Resources")) 384 cur = cur.Append(FILE_PATH_LITERAL("Resources"))
385 .Append(FILE_PATH_LITERAL("resources.pak")); 385 .Append(FILE_PATH_LITERAL("resources.pak"));
386 break; 386 break;
387 } 387 }
388 #elif defined(OS_ANDROID) 388 #elif defined(OS_ANDROID)
389 if (!PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &cur)) 389 if (!PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &cur))
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 599
600 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { 600 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) {
601 g_invalid_specified_user_data_dir.Get() = user_data_dir; 601 g_invalid_specified_user_data_dir.Get() = user_data_dir;
602 } 602 }
603 603
604 const base::FilePath& GetInvalidSpecifiedUserDataDir() { 604 const base::FilePath& GetInvalidSpecifiedUserDataDir() {
605 return g_invalid_specified_user_data_dir.Get(); 605 return g_invalid_specified_user_data_dir.Get();
606 } 606 }
607 607
608 } // namespace chrome 608 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/chrome_content_client.cc ('k') | chrome/renderer/chrome_content_renderer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698