OLD | NEW |
(Empty) | |
| 1 // Copyright 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. |
| 4 |
| 5 #include "chrome/browser/ui/app_list/app_list_service.h" |
| 6 |
| 7 #include "base/prefs/pref_registry_simple.h" |
| 8 #include "base/prefs/pref_service.h" |
| 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/extensions/extension_prefs.h" |
| 11 #include "chrome/common/chrome_constants.h" |
| 12 #include "chrome/common/pref_names.h" |
| 13 |
| 14 // static |
| 15 void AppListService::RegisterPrefs(PrefRegistrySimple* registry) { |
| 16 registry->RegisterStringPref(prefs::kAppListProfile, ""); |
| 17 } |
| 18 |
| 19 void AppListService::Init(Profile* initial_profile) {} |
| 20 |
| 21 base::FilePath AppListService::GetAppListProfilePath( |
| 22 const base::FilePath& user_data_dir) { |
| 23 PrefService* local_state = g_browser_process->local_state(); |
| 24 DCHECK(local_state); |
| 25 |
| 26 std::string app_list_profile; |
| 27 if (local_state->HasPrefPath(prefs::kAppListProfile)) |
| 28 app_list_profile = local_state->GetString(prefs::kAppListProfile); |
| 29 |
| 30 // If the user has no profile preference for the app launcher, default to the |
| 31 // last browser profile used. |
| 32 if (app_list_profile.empty() && |
| 33 local_state->HasPrefPath(prefs::kProfileLastUsed)) |
| 34 app_list_profile = local_state->GetString(prefs::kProfileLastUsed); |
| 35 |
| 36 std::string profile_path = app_list_profile.empty() ? |
| 37 chrome::kInitialProfile : |
| 38 app_list_profile; |
| 39 |
| 40 return user_data_dir.AppendASCII(profile_path); |
| 41 } |
| 42 |
| 43 void AppListService::ShowAppList(Profile* profile) {} |
| 44 |
| 45 void AppListService::DismissAppList() {} |
| 46 |
| 47 void AppListService::SetAppListProfile( |
| 48 const base::FilePath& profile_file_path) {} |
| 49 |
| 50 Profile* AppListService::GetCurrentAppListProfile() { return NULL; } |
| 51 |
| 52 bool AppListService::IsAppListVisible() const { return false; } |
| 53 |
| 54 void AppListService::OnProfileAdded(const base::FilePath& profilePath) {} |
| 55 |
| 56 void AppListService::OnProfileWillBeRemoved( |
| 57 const base::FilePath& profile_path) {} |
| 58 |
| 59 void AppListService::OnProfileWasRemoved(const base::FilePath& profile_path, |
| 60 const string16& profile_name) {} |
| 61 |
| 62 void AppListService::OnProfileNameChanged(const base::FilePath& profile_path, |
| 63 const string16& profile_name) {} |
| 64 |
| 65 void AppListService::OnProfileAvatarChanged( |
| 66 const base::FilePath& profile_path) {} |
OLD | NEW |