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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/kiosk_app_menu_handler.cc

Issue 17503004: cros: Don't check consume kiosk flag for enterprise managed device. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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/chromeos/login/kiosk_app_menu_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/kiosk_app_menu_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" 11 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h"
11 #include "chrome/browser/chromeos/app_mode/kiosk_app_launcher.h" 12 #include "chrome/browser/chromeos/app_mode/kiosk_app_launcher.h"
12 #include "chrome/browser/chromeos/login/existing_user_controller.h" 13 #include "chrome/browser/chromeos/login/existing_user_controller.h"
14 #include "chrome/browser/policy/browser_policy_connector.h"
13 #include "chrome/common/chrome_notification_types.h" 15 #include "chrome/common/chrome_notification_types.h"
14 #include "chromeos/chromeos_switches.h" 16 #include "chromeos/chromeos_switches.h"
15 #include "content/public/browser/notification_details.h" 17 #include "content/public/browser/notification_details.h"
16 #include "content/public/browser/notification_service.h" 18 #include "content/public/browser/notification_service.h"
17 #include "content/public/browser/web_ui.h" 19 #include "content/public/browser/web_ui.h"
18 #include "grit/generated_resources.h" 20 #include "grit/generated_resources.h"
19 #include "ui/base/l10n/l10n_util.h" 21 #include "ui/base/l10n/l10n_util.h"
20 #include "ui/webui/web_ui_util.h" 22 #include "ui/webui/web_ui_util.h"
21 23
22 namespace chromeos { 24 namespace chromeos {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 82
81 apps_list.Append(app_info.release()); 83 apps_list.Append(app_info.release());
82 } 84 }
83 85
84 web_ui()->CallJavascriptFunction("login.AppsMenuButton.setApps", 86 web_ui()->CallJavascriptFunction("login.AppsMenuButton.setApps",
85 apps_list); 87 apps_list);
86 } 88 }
87 89
88 void KioskAppMenuHandler::HandleInitializeKioskApps( 90 void KioskAppMenuHandler::HandleInitializeKioskApps(
89 const base::ListValue* args) { 91 const base::ListValue* args) {
92 if (g_browser_process->browser_policy_connector()->IsEnterpriseManaged()) {
93 initialized_ = true;
94 SendKioskApps();
95 return;
96 }
97
90 KioskAppManager::Get()->GetConsumerKioskModeStatus( 98 KioskAppManager::Get()->GetConsumerKioskModeStatus(
91 base::Bind(&KioskAppMenuHandler::OnGetConsumerKioskModeStatus, 99 base::Bind(&KioskAppMenuHandler::OnGetConsumerKioskModeStatus,
92 weak_ptr_factory_.GetWeakPtr())); 100 weak_ptr_factory_.GetWeakPtr()));
93 } 101 }
94 102
95 void KioskAppMenuHandler::OnGetConsumerKioskModeStatus( 103 void KioskAppMenuHandler::OnGetConsumerKioskModeStatus(
96 KioskAppManager::ConsumerKioskModeStatus status) { 104 KioskAppManager::ConsumerKioskModeStatus status) {
97 initialized_ = 105 initialized_ =
98 status == KioskAppManager::CONSUMER_KIOSK_MODE_ENABLED; 106 status == KioskAppManager::CONSUMER_KIOSK_MODE_ENABLED;
99 SendKioskApps(); 107 SendKioskApps();
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 142
135 void KioskAppMenuHandler::OnKioskAppsSettingsChanged() { 143 void KioskAppMenuHandler::OnKioskAppsSettingsChanged() {
136 SendKioskApps(); 144 SendKioskApps();
137 } 145 }
138 146
139 void KioskAppMenuHandler::OnKioskAppDataChanged(const std::string& app_id) { 147 void KioskAppMenuHandler::OnKioskAppDataChanged(const std::string& app_id) {
140 SendKioskApps(); 148 SendKioskApps();
141 } 149 }
142 150
143 } // namespace chromeos 151 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698