| Index: chrome/browser/ui/webui/ntp/app_launcher_handler.cc
|
| diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
|
| index 4f8f26dd4764c4200ea8262ad04e974e1d54bc90..a23063c5eb8000143622016fc25c8b1d5dd5bfe4 100644
|
| --- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
|
| +++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
|
| @@ -370,7 +370,7 @@ void AppLauncherHandler::FillAppDictionary(DictionaryValue* dictionary) {
|
| extension_service_->GetAppIds()));
|
|
|
| if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewTabPage4)) {
|
| - PrefService* prefs = web_ui_->GetProfile()->GetPrefs();
|
| + PrefService* prefs = Profile::FromWebUI(web_ui_)->GetPrefs();
|
| const ListValue* app_page_names = prefs->GetList(prefs::kNTPAppPageNames);
|
| if (app_page_names && app_page_names->GetSize()) {
|
| dictionary->Set("appPageNames",
|
| @@ -410,7 +410,7 @@ void AppLauncherHandler::HandleGetApps(const ListValue* args) {
|
| // b) Conceptually, it doesn't really make sense to count a
|
| // prefchange-triggered refresh as a promo 'view'.
|
| AppsPromo* apps_promo = extension_service_->apps_promo();
|
| - PrefService* prefs = web_ui_->GetProfile()->GetPrefs();
|
| + PrefService* prefs = Profile::FromWebUI(web_ui_)->GetPrefs();
|
| bool apps_promo_just_expired = false;
|
| if (apps_promo->ShouldShowPromo(extension_service_->GetAppIds(),
|
| &apps_promo_just_expired)) {
|
| @@ -682,7 +682,7 @@ void AppLauncherHandler::HandleSaveAppPageName(const ListValue* args) {
|
| CHECK(args->GetDouble(1, &page_index));
|
|
|
| AutoReset<bool> auto_reset(&ignore_changes_, true);
|
| - PrefService* prefs = web_ui_->GetProfile()->GetPrefs();
|
| + PrefService* prefs = Profile::FromWebUI(web_ui_)->GetPrefs();
|
| ListPrefUpdate update(prefs, prefs::kNTPAppPageNames);
|
| ListValue* list = update.Get();
|
| list->Set(static_cast<size_t>(page_index), Value::CreateStringValue(name));
|
| @@ -702,7 +702,7 @@ void AppLauncherHandler::HandleGenerateAppForLink(const ListValue* args) {
|
| web_app->title = title;
|
| web_app->app_url = launch_url;
|
|
|
| - Profile* profile = web_ui_->GetProfile();
|
| + Profile* profile = Profile::FromWebUI(web_ui_);
|
| FaviconService* favicon_service =
|
| profile->GetFaviconService(Profile::EXPLICIT_ACCESS);
|
| if (!favicon_service) {
|
| @@ -730,7 +730,7 @@ void AppLauncherHandler::HandleRecordAppLaunchByURL(
|
| static_cast<extension_misc::AppLaunchBucket>(static_cast<int>(source));
|
| CHECK(source < extension_misc::APP_LAUNCH_BUCKET_BOUNDARY);
|
|
|
| - RecordAppLaunchByURL(web_ui_->GetProfile(), url, bucket);
|
| + RecordAppLaunchByURL(Profile::FromWebUI(web_ui_), url, bucket);
|
| }
|
|
|
| void AppLauncherHandler::OnFaviconForApp(FaviconService::Handle handle,
|
| @@ -897,7 +897,7 @@ void AppLauncherHandler::InstallUIAbort(bool user_initiated) {
|
| ExtensionUninstallDialog* AppLauncherHandler::GetExtensionUninstallDialog() {
|
| if (!extension_uninstall_dialog_.get()) {
|
| extension_uninstall_dialog_.reset(
|
| - new ExtensionUninstallDialog(web_ui_->GetProfile()));
|
| + new ExtensionUninstallDialog(Profile::FromWebUI(web_ui_)));
|
| }
|
| return extension_uninstall_dialog_.get();
|
| }
|
| @@ -905,7 +905,7 @@ ExtensionUninstallDialog* AppLauncherHandler::GetExtensionUninstallDialog() {
|
| ExtensionInstallUI* AppLauncherHandler::GetExtensionInstallUI() {
|
| if (!extension_install_ui_.get()) {
|
| extension_install_ui_.reset(
|
| - new ExtensionInstallUI(web_ui_->GetProfile()));
|
| + new ExtensionInstallUI(Profile::FromWebUI(web_ui_)));
|
| }
|
| return extension_install_ui_.get();
|
| }
|
|
|