Chromium Code Reviews| 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 base::FilePath AppListService::GetAppListProfilePath( | |
| 16 const base::FilePath& user_data_dir) { | |
| 17 PrefService* local_state = g_browser_process->local_state(); | |
| 18 DCHECK(local_state); | |
| 19 | |
| 20 std::string app_list_profile; | |
| 21 if (local_state->HasPrefPath(prefs::kAppListProfile)) | |
| 22 app_list_profile = local_state->GetString(prefs::kAppListProfile); | |
| 23 | |
| 24 // If the user has no profile preference for the app launcher, default to the | |
| 25 // last browser profile used. | |
| 26 if (app_list_profile.empty() && | |
| 27 local_state->HasPrefPath(prefs::kProfileLastUsed)) | |
| 28 app_list_profile = local_state->GetString(prefs::kProfileLastUsed); | |
| 29 | |
| 30 std::string profile_path = app_list_profile.empty() ? | |
| 31 chrome::kInitialProfile : | |
| 32 app_list_profile; | |
| 33 | |
| 34 return user_data_dir.AppendASCII(profile_path); | |
| 35 } | |
| 36 | |
| 37 // static | |
| 38 void AppListService::RegisterAppListPrefs(PrefRegistrySimple* registry) { | |
| 39 registry->RegisterStringPref(prefs::kAppListProfile, ""); | |
| 40 } | |
| 41 | |
| 42 void AppListService::Init(Profile* initial_profile) {} | |
| 43 | |
| 44 void AppListService::ShowAppList(Profile* profile) {} | |
| 45 | |
| 46 void AppListService::DismissAppList() {} | |
| 47 | |
| 48 void AppListService::SetAppListProfile( | |
| 49 const base::FilePath& profile_file_path) {} | |
| 50 | |
| 51 Profile* AppListService::GetCurrentAppListProfile() { return NULL; } | |
| 52 | |
| 53 bool AppListService::IsAppListVisible() const { return false; } | |
| 54 | |
| 55 void AppListService::OnBeginExtensionInstall( | |
| 56 Profile* profile, | |
| 57 const std::string& extension_id, | |
| 58 const std::string& extension_name, | |
| 59 const gfx::ImageSkia& installing_icon) {} | |
| 60 | |
| 61 void AppListService::OnDownloadProgress( | |
| 62 Profile* profile, | |
| 63 const std::string& extension_id, | |
| 64 int percent_downloaded) {} | |
| 65 | |
| 66 void AppListService::OnExtensionInstallFailure( | |
| 67 Profile* profile, | |
| 68 const std::string& extension_id) {} | |
| 69 | |
| 70 void AppListService::OnProfileAdded(const base::FilePath& profilePath) {} | |
|
benwells
2013/02/19 03:49:42
A few blank lines in here wouldn't go astray...
tapted
2013/02/19 04:25:21
Done.
| |
| 71 void AppListService::OnProfileWillBeRemoved( | |
| 72 const base::FilePath& profile_path) {} | |
| 73 void AppListService::OnProfileWasRemoved(const base::FilePath& profile_path, | |
| 74 const string16& profile_name) {} | |
| 75 void AppListService::OnProfileNameChanged(const base::FilePath& profile_path, | |
| 76 const string16& profile_name) {} | |
| 77 void AppListService::OnProfileAvatarChanged( | |
| 78 const base::FilePath& profile_path) {} | |
| OLD | NEW |