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

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

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 5 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/metrics_names.h" 9 #include "apps/metrics_names.h"
10 #include "apps/pref_names.h" 10 #include "apps/pref_names.h"
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 } 746 }
747 747
748 void AppLauncherHandler::OnLocalStatePreferenceChanged() { 748 void AppLauncherHandler::OnLocalStatePreferenceChanged() {
749 web_ui()->CallJavascriptFunction( 749 web_ui()->CallJavascriptFunction(
750 "ntp.appLauncherPromoPrefChangeCallback", 750 "ntp.appLauncherPromoPrefChangeCallback",
751 base::FundamentalValue(g_browser_process->local_state()->GetBoolean( 751 base::FundamentalValue(g_browser_process->local_state()->GetBoolean(
752 apps::prefs::kShowAppLauncherPromo))); 752 apps::prefs::kShowAppLauncherPromo)));
753 } 753 }
754 754
755 // static 755 // static
756 void AppLauncherHandler::RegisterUserPrefs( 756 void AppLauncherHandler::RegisterProfilePrefs(
757 user_prefs::PrefRegistrySyncable* registry) { 757 user_prefs::PrefRegistrySyncable* registry) {
758 registry->RegisterListPref(prefs::kNtpAppPageNames, 758 registry->RegisterListPref(prefs::kNtpAppPageNames,
759 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 759 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
760 } 760 }
761 761
762 void AppLauncherHandler::CleanupAfterUninstall() { 762 void AppLauncherHandler::CleanupAfterUninstall() {
763 extension_id_prompting_.clear(); 763 extension_id_prompting_.clear();
764 } 764 }
765 765
766 // static 766 // static
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 ExtensionUninstallDialog* AppLauncherHandler::GetExtensionUninstallDialog() { 892 ExtensionUninstallDialog* AppLauncherHandler::GetExtensionUninstallDialog() {
893 if (!extension_uninstall_dialog_.get()) { 893 if (!extension_uninstall_dialog_.get()) {
894 Browser* browser = chrome::FindBrowserWithWebContents( 894 Browser* browser = chrome::FindBrowserWithWebContents(
895 web_ui()->GetWebContents()); 895 web_ui()->GetWebContents());
896 extension_uninstall_dialog_.reset( 896 extension_uninstall_dialog_.reset(
897 ExtensionUninstallDialog::Create(extension_service_->profile(), 897 ExtensionUninstallDialog::Create(extension_service_->profile(),
898 browser, this)); 898 browser, this));
899 } 899 }
900 return extension_uninstall_dialog_.get(); 900 return extension_uninstall_dialog_.get();
901 } 901 }
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