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

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

Issue 14622003: components: Move PrefRegistrySyncable into user_prefs namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 years, 7 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 <vector> 7 #include <vector>
8 8
9 #include "apps/pref_names.h" 9 #include "apps/pref_names.h"
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 } 738 }
739 739
740 void AppLauncherHandler::OnLocalStatePreferenceChanged() { 740 void AppLauncherHandler::OnLocalStatePreferenceChanged() {
741 web_ui()->CallJavascriptFunction( 741 web_ui()->CallJavascriptFunction(
742 "ntp.appLauncherPromoPrefChangeCallback", 742 "ntp.appLauncherPromoPrefChangeCallback",
743 base::FundamentalValue(g_browser_process->local_state()->GetBoolean( 743 base::FundamentalValue(g_browser_process->local_state()->GetBoolean(
744 apps::prefs::kShowAppLauncherPromo))); 744 apps::prefs::kShowAppLauncherPromo)));
745 } 745 }
746 746
747 // static 747 // static
748 void AppLauncherHandler::RegisterUserPrefs(PrefRegistrySyncable* registry) { 748 void AppLauncherHandler::RegisterUserPrefs(
749 user_prefs::PrefRegistrySyncable* registry) {
749 registry->RegisterListPref(prefs::kNtpAppPageNames, 750 registry->RegisterListPref(prefs::kNtpAppPageNames,
750 PrefRegistrySyncable::SYNCABLE_PREF); 751 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
751 } 752 }
752 753
753 void AppLauncherHandler::CleanupAfterUninstall() { 754 void AppLauncherHandler::CleanupAfterUninstall() {
754 extension_id_prompting_.clear(); 755 extension_id_prompting_.clear();
755 } 756 }
756 757
757 // static 758 // static
758 void AppLauncherHandler::RecordAppLaunchType( 759 void AppLauncherHandler::RecordAppLaunchType(
759 extension_misc::AppLaunchBucket bucket, 760 extension_misc::AppLaunchBucket bucket,
760 extensions::Manifest::Type app_type) { 761 extensions::Manifest::Type app_type) {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 ExtensionUninstallDialog* AppLauncherHandler::GetExtensionUninstallDialog() { 866 ExtensionUninstallDialog* AppLauncherHandler::GetExtensionUninstallDialog() {
866 if (!extension_uninstall_dialog_.get()) { 867 if (!extension_uninstall_dialog_.get()) {
867 Browser* browser = chrome::FindBrowserWithWebContents( 868 Browser* browser = chrome::FindBrowserWithWebContents(
868 web_ui()->GetWebContents()); 869 web_ui()->GetWebContents());
869 extension_uninstall_dialog_.reset( 870 extension_uninstall_dialog_.reset(
870 ExtensionUninstallDialog::Create(extension_service_->profile(), 871 ExtensionUninstallDialog::Create(extension_service_->profile(),
871 browser, this)); 872 browser, this));
872 } 873 }
873 return extension_uninstall_dialog_.get(); 874 return extension_uninstall_dialog_.get();
874 } 875 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/app_launcher_handler.h ('k') | chrome/browser/ui/webui/ntp/foreign_session_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698