| Index: chromeos/chromeos_paths.cc
|
| diff --git a/chromeos/chromeos_paths.cc b/chromeos/chromeos_paths.cc
|
| index bdb3fa9c1f5997be3f72c058967e0c9e28b46379..53177d2eef8f70abae1152a8734d486d87f18a90 100644
|
| --- a/chromeos/chromeos_paths.cc
|
| +++ b/chromeos/chromeos_paths.cc
|
| @@ -32,6 +32,9 @@ const base::FilePath::CharType kInstallAttributesFileName[] =
|
| const base::FilePath::CharType kMachineHardwareInfoFileName[] =
|
| FILE_PATH_LITERAL("/tmp/machine-info");
|
|
|
| +const base::FilePath::CharType kVpdFileName[] =
|
| + FILE_PATH_LITERAL("/var/log/vpd_2.0.txt");
|
| +
|
| const base::FilePath::CharType kUptimeFileName[] =
|
| FILE_PATH_LITERAL("/proc/uptime");
|
|
|
| @@ -73,6 +76,9 @@ bool PathProvider(int key, base::FilePath* result) {
|
| case FILE_MACHINE_INFO:
|
| *result = base::FilePath(kMachineHardwareInfoFileName);
|
| break;
|
| + case FILE_VPD:
|
| + *result = base::FilePath(kVpdFileName);
|
| + break;
|
| case FILE_UPTIME:
|
| *result = base::FilePath(kUptimeFileName);
|
| break;
|
| @@ -111,8 +117,8 @@ void RegisterPathProvider() {
|
|
|
| void RegisterStubPathOverrides(const base::FilePath& stubs_dir) {
|
| CHECK(!base::SysInfo::IsRunningOnChromeOS());
|
| - // Override these paths on the desktop, so that enrollment and cloud
|
| - // policy work and can be tested.
|
| + // Override these paths on the desktop, so that enrollment and cloud policy
|
| + // work and can be tested.
|
| base::FilePath parent = base::MakeAbsoluteFilePath(stubs_dir);
|
| PathService::Override(
|
| DIR_USER_POLICY_KEYS,
|
| @@ -134,6 +140,11 @@ void RegisterStubPathOverrides(const base::FilePath& stubs_dir) {
|
| parent.AppendASCII("stub_machine-info"),
|
| is_absolute,
|
| create);
|
| + PathService::OverrideAndCreateIfNeeded(
|
| + FILE_VPD,
|
| + parent.AppendASCII("stub_vpd"),
|
| + is_absolute,
|
| + create);
|
| PathService::Override(
|
| DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS,
|
| parent.AppendASCII("stub_device_local_account_extensions"));
|
|
|