OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/browser/ui/app_list/app_list_util.h" | 5 #include "chrome/browser/ui/app_list/app_list_util.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/extensions/extension_prefs.h" | 10 #include "chrome/browser/extensions/extension_prefs.h" |
| 11 #include "chrome/browser/prefs/pref_registry_simple.h" |
11 #include "chrome/browser/prefs/pref_service.h" | 12 #include "chrome/browser/prefs/pref_service.h" |
12 #include "chrome/common/chrome_constants.h" | 13 #include "chrome/common/chrome_constants.h" |
13 #include "chrome/common/pref_names.h" | 14 #include "chrome/common/pref_names.h" |
14 | 15 |
15 namespace chrome { | 16 namespace chrome { |
16 | 17 |
17 #if defined(OS_CHROMEOS) | 18 #if defined(OS_CHROMEOS) |
18 // Default implementation for ports which do not have this implemented. | 19 // Default implementation for ports which do not have this implemented. |
19 void InitAppList(Profile* profile) {} | 20 void InitAppList(Profile* profile) {} |
20 #endif | 21 #endif |
(...skipping 13 matching lines...) Expand all Loading... |
34 local_state->HasPrefPath(prefs::kProfileLastUsed)) | 35 local_state->HasPrefPath(prefs::kProfileLastUsed)) |
35 app_list_profile = local_state->GetString(prefs::kProfileLastUsed); | 36 app_list_profile = local_state->GetString(prefs::kProfileLastUsed); |
36 | 37 |
37 std::string profile_path = app_list_profile.empty() ? | 38 std::string profile_path = app_list_profile.empty() ? |
38 chrome::kInitialProfile : | 39 chrome::kInitialProfile : |
39 app_list_profile; | 40 app_list_profile; |
40 | 41 |
41 return user_data_dir.AppendASCII(profile_path); | 42 return user_data_dir.AppendASCII(profile_path); |
42 } | 43 } |
43 | 44 |
44 void RegisterAppListPrefs(PrefServiceSimple* prefs) { | 45 void RegisterAppListPrefs(PrefRegistrySimple* registry) { |
45 prefs->RegisterStringPref(prefs::kAppListProfile, ""); | 46 registry->RegisterStringPref(prefs::kAppListProfile, ""); |
46 } | 47 } |
47 #endif // defined(ENABLE_APP_LIST) | 48 #endif // defined(ENABLE_APP_LIST) |
48 | 49 |
49 | 50 |
50 } // namespace chrome | 51 } // namespace chrome |
OLD | NEW |