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

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

Issue 1908043002: [Mac] In unit_tests use the resources.pak in the framework bundle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-chrome
Patch Set: Created 4 years, 8 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
« no previous file with comments | « chrome/chrome_dll_bundle.gypi ('k') | chrome/test/base/chrome_unit_test_suite.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 // In the component case, this is the source adapter. Otherwise, it is the 352 // In the component case, this is the source adapter. Otherwise, it is the
353 // actual Pepper module that gets loaded. 353 // actual Pepper module that gets loaded.
354 case chrome::FILE_WIDEVINE_CDM_ADAPTER: 354 case chrome::FILE_WIDEVINE_CDM_ADAPTER:
355 if (!GetInternalPluginsDirectory(&cur)) 355 if (!GetInternalPluginsDirectory(&cur))
356 return false; 356 return false;
357 cur = cur.AppendASCII(kWidevineCdmAdapterFileName); 357 cur = cur.AppendASCII(kWidevineCdmAdapterFileName);
358 break; 358 break;
359 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) 359 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
360 case chrome::FILE_RESOURCES_PACK: 360 case chrome::FILE_RESOURCES_PACK:
361 #if defined(OS_MACOSX) 361 #if defined(OS_MACOSX)
362 if (base::mac::AmIBundled()) { 362 cur = base::mac::FrameworkBundlePath();
363 cur = base::mac::FrameworkBundlePath(); 363 cur = cur.Append(FILE_PATH_LITERAL("Resources"))
364 cur = cur.Append(FILE_PATH_LITERAL("Resources")) 364 .Append(FILE_PATH_LITERAL("resources.pak"));
365 .Append(FILE_PATH_LITERAL("resources.pak")); 365 break;
366 break;
367 }
368 #elif defined(OS_ANDROID) 366 #elif defined(OS_ANDROID)
369 if (!PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &cur)) 367 if (!PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &cur))
370 return false; 368 return false;
371 #else 369 #else
372 // If we're not bundled on mac or Android, resources.pak should be next 370 // If we're not bundled on mac or Android, resources.pak should be next
373 // to the binary (e.g., for unit tests). 371 // to the binary (e.g., for unit tests).
374 if (!PathService::Get(base::DIR_MODULE, &cur)) 372 if (!PathService::Get(base::DIR_MODULE, &cur))
375 return false; 373 return false;
376 #endif 374 #endif
377 cur = cur.Append(FILE_PATH_LITERAL("resources.pak")); 375 cur = cur.Append(FILE_PATH_LITERAL("resources.pak"));
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 566
569 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { 567 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) {
570 g_invalid_specified_user_data_dir.Get() = user_data_dir; 568 g_invalid_specified_user_data_dir.Get() = user_data_dir;
571 } 569 }
572 570
573 const base::FilePath& GetInvalidSpecifiedUserDataDir() { 571 const base::FilePath& GetInvalidSpecifiedUserDataDir() {
574 return g_invalid_specified_user_data_dir.Get(); 572 return g_invalid_specified_user_data_dir.Get();
575 } 573 }
576 574
577 } // namespace chrome 575 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/chrome_dll_bundle.gypi ('k') | chrome/test/base/chrome_unit_test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698