Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(977)

Side by Side Diff: chrome/browser/ui/webui/ntp/app_launcher_handler.cc

Issue 10828345: Extract PrefServiceBase into chrome/browser/api. Use in api and autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/webui/ntp/app_launcher_handler.h" 5 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 void AppLauncherHandler::SetAppToBeHighlighted() { 785 void AppLauncherHandler::SetAppToBeHighlighted() {
786 if (highlight_app_id_.empty()) 786 if (highlight_app_id_.empty())
787 return; 787 return;
788 788
789 StringValue app_id(highlight_app_id_); 789 StringValue app_id(highlight_app_id_);
790 web_ui()->CallJavascriptFunction("ntp.setAppToBeHighlighted", app_id); 790 web_ui()->CallJavascriptFunction("ntp.setAppToBeHighlighted", app_id);
791 highlight_app_id_.clear(); 791 highlight_app_id_.clear();
792 } 792 }
793 793
794 // static 794 // static
795 void AppLauncherHandler::RegisterUserPrefs(PrefService* pref_service) { 795 void AppLauncherHandler::RegisterUserPrefs(PrefServiceBase* pref_service) {
796 pref_service->RegisterListPref(prefs::kNtpAppPageNames, 796 pref_service->RegisterListPref(prefs::kNtpAppPageNames,
797 PrefService::SYNCABLE_PREF); 797 PrefService::SYNCABLE_PREF);
798 } 798 }
799 799
800 void AppLauncherHandler::CleanupAfterUninstall() { 800 void AppLauncherHandler::CleanupAfterUninstall() {
801 extension_id_prompting_.clear(); 801 extension_id_prompting_.clear();
802 } 802 }
803 803
804 // static 804 // static
805 void AppLauncherHandler::RecordAppLaunchType( 805 void AppLauncherHandler::RecordAppLaunchType(
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 940
941 ExtensionInstallPrompt* AppLauncherHandler::GetExtensionInstallPrompt() { 941 ExtensionInstallPrompt* AppLauncherHandler::GetExtensionInstallPrompt() {
942 if (!extension_install_ui_.get()) { 942 if (!extension_install_ui_.get()) {
943 Browser* browser = browser::FindBrowserWithWebContents( 943 Browser* browser = browser::FindBrowserWithWebContents(
944 web_ui()->GetWebContents()); 944 web_ui()->GetWebContents());
945 extension_install_ui_.reset( 945 extension_install_ui_.reset(
946 chrome::CreateExtensionInstallPromptWithBrowser(browser)); 946 chrome::CreateExtensionInstallPromptWithBrowser(browser));
947 } 947 }
948 return extension_install_ui_.get(); 948 return extension_install_ui_.get();
949 } 949 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/app_launcher_handler.h ('k') | chrome/browser/ui/webui/options/startup_pages_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698