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

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

Issue 334783002: Componentize component_updater: Move some paths/constants to component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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/common/chrome_paths.h" 5 #include "chrome/common/chrome_paths.h"
6 6
7 #include "base/file_util.h" 7 #include "base/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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 cur = cur.DirName(); 345 cur = cur.DirName();
346 cur = cur.DirName(); 346 cur = cur.DirName();
347 cur = cur.DirName(); 347 cur = cur.DirName();
348 } 348 }
349 #else 349 #else
350 if (!GetInternalPluginsDirectory(&cur)) 350 if (!GetInternalPluginsDirectory(&cur))
351 return false; 351 return false;
352 #endif 352 #endif
353 cur = cur.Append(FILE_PATH_LITERAL("pnacl")); 353 cur = cur.Append(FILE_PATH_LITERAL("pnacl"));
354 break; 354 break;
355 case chrome::DIR_RECOVERY_BASE:
356 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
357 return false;
358 cur = cur.Append(FILE_PATH_LITERAL("recovery"));
359 create_dir = true;
360 break;
361 #if defined(OS_POSIX) && !defined(OS_MACOSX) 355 #if defined(OS_POSIX) && !defined(OS_MACOSX)
362 case chrome::FILE_O1D_PLUGIN: 356 case chrome::FILE_O1D_PLUGIN:
363 if (!PathService::Get(base::DIR_MODULE, &cur)) 357 if (!PathService::Get(base::DIR_MODULE, &cur))
364 return false; 358 return false;
365 cur = cur.Append(kO1DPluginFileName); 359 cur = cur.Append(kO1DPluginFileName);
366 break; 360 break;
367 case chrome::FILE_GTALK_PLUGIN: 361 case chrome::FILE_GTALK_PLUGIN:
368 if (!PathService::Get(base::DIR_MODULE, &cur)) 362 if (!PathService::Get(base::DIR_MODULE, &cur))
369 return false; 363 return false;
370 cur = cur.Append(kGTalkPluginFileName); 364 cur = cur.Append(kGTalkPluginFileName);
371 break; 365 break;
372 #endif 366 #endif
373 case chrome::DIR_COMPONENT_CLD2:
374 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
375 return false;
376 cur = cur.Append(FILE_PATH_LITERAL("CLD"));
377 break;
378 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) 367 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
379 #if defined(WIDEVINE_CDM_IS_COMPONENT) 368 #if defined(WIDEVINE_CDM_IS_COMPONENT)
380 case chrome::DIR_COMPONENT_WIDEVINE_CDM: 369 case chrome::DIR_COMPONENT_WIDEVINE_CDM:
381 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 370 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
382 return false; 371 return false;
383 cur = cur.Append(kWidevineCdmBaseDirectory); 372 cur = cur.Append(kWidevineCdmBaseDirectory);
384 break; 373 break;
385 #endif // defined(WIDEVINE_CDM_IS_COMPONENT) 374 #endif // defined(WIDEVINE_CDM_IS_COMPONENT)
386 // TODO(xhwang): FILE_WIDEVINE_CDM_ADAPTER has different meanings. 375 // TODO(xhwang): FILE_WIDEVINE_CDM_ADAPTER has different meanings.
387 // In the component case, this is the source adapter. Otherwise, it is the 376 // In the component case, this is the source adapter. Otherwise, it is the
388 // actual Pepper module that gets loaded. 377 // actual Pepper module that gets loaded.
389 case chrome::FILE_WIDEVINE_CDM_ADAPTER: 378 case chrome::FILE_WIDEVINE_CDM_ADAPTER:
tommycli 2014/06/27 17:48:11 This widevine path also belongs in components/, bu
Sorin Jianu 2014/06/30 22:27:53 Tommy, I don't understand what this means. Two ide
tommycli 2014/07/01 00:03:04 Sounds good. Let's do it in a separate CL.
390 if (!GetInternalPluginsDirectory(&cur)) 379 if (!GetInternalPluginsDirectory(&cur))
391 return false; 380 return false;
392 cur = cur.AppendASCII(kWidevineCdmAdapterFileName); 381 cur = cur.AppendASCII(kWidevineCdmAdapterFileName);
393 break; 382 break;
394 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) 383 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
395 case chrome::FILE_RESOURCES_PACK: 384 case chrome::FILE_RESOURCES_PACK:
396 #if defined(OS_MACOSX) && !defined(OS_IOS) 385 #if defined(OS_MACOSX) && !defined(OS_IOS)
397 if (base::mac::AmIBundled()) { 386 if (base::mac::AmIBundled()) {
398 cur = base::mac::FrameworkBundlePath(); 387 cur = base::mac::FrameworkBundlePath();
399 cur = cur.Append(FILE_PATH_LITERAL("Resources")) 388 cur = cur.Append(FILE_PATH_LITERAL("Resources"))
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 596
608 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { 597 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) {
609 g_invalid_specified_user_data_dir.Get() = user_data_dir; 598 g_invalid_specified_user_data_dir.Get() = user_data_dir;
610 } 599 }
611 600
612 const base::FilePath& GetInvalidSpecifiedUserDataDir() { 601 const base::FilePath& GetInvalidSpecifiedUserDataDir() {
613 return g_invalid_specified_user_data_dir.Get(); 602 return g_invalid_specified_user_data_dir.Get();
614 } 603 }
615 604
616 } // namespace chrome 605 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698