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
3 // found in the LICENSE file.
5 #include "chrome/common/importer/ie_importer_utils_win.h"
7 #include "chrome/common/importer/ie_importer_test_registry_overrider_win.h"
11 const char16 kIEFavoritesOrderKey[] =
12 L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\"
13 L"MenuOrder\\Favorites";
15 const char16 kIEStorage2Key[] =
16 L"Software\\Microsoft\\Internet Explorer\\IntelliForms\\Storage2";
18 const char16 kIESettingsMainKey[] =
19 L"Software\\Microsoft\\Internet Explorer\\Main";
21 string16 GetPotentiallyOverridenIEKey(const string16& desired_key_path) {
22 base::string16 test_reg_override(
23 IEImporterTestRegistryOverrider::GetTestRegistryOverride());
24 return test_reg_override.empty() ? desired_key_path : test_reg_override;
31 base::string16 GetIEFavoritesOrderKey() {
32 // Return kIEFavoritesOrderKey unless an override has been set for tests.
33 return GetPotentiallyOverridenIEKey(kIEFavoritesOrderKey);
36 base::string16 GetIE7PasswordsKey() {
37 // Return kIEStorage2Key unless an override has been set for tests.
38 return GetPotentiallyOverridenIEKey(kIEStorage2Key);
41 base::string16 GetIESettingsKey() {
42 // Return kIESettingsMainKey unless an override has been set for tests.
43 return GetPotentiallyOverridenIEKey(kIESettingsMainKey);
46 } // namespace importer