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

Side by Side Diff: chrome/browser/ui/webui/options/options_ui.cc

Issue 438493002: Added ConsumerManagementService class to handle enroll state and device owner info in boot lockbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@signin
Patch Set: Only create ConsumerManagementService when --enable-consumer-management is specified. Created 6 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
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/options/options_ui.h" 5 #include "chrome/browser/ui/webui/options/options_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 #include "grit/options_resources.h" 63 #include "grit/options_resources.h"
64 #include "grit/theme_resources.h" 64 #include "grit/theme_resources.h"
65 #include "net/base/escape.h" 65 #include "net/base/escape.h"
66 #include "ui/base/l10n/l10n_util.h" 66 #include "ui/base/l10n/l10n_util.h"
67 #include "ui/base/resource/resource_bundle.h" 67 #include "ui/base/resource/resource_bundle.h"
68 #include "ui/base/webui/jstemplate_builder.h" 68 #include "ui/base/webui/jstemplate_builder.h"
69 #include "ui/base/webui/web_ui_util.h" 69 #include "ui/base/webui/web_ui_util.h"
70 #include "url/gurl.h" 70 #include "url/gurl.h"
71 71
72 #if defined(OS_CHROMEOS) 72 #if defined(OS_CHROMEOS)
73 #include "chrome/browser/browser_process_platform_part.h"
74 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
75 #include "chrome/browser/chromeos/policy/consumer_management_service.h"
73 #include "chrome/browser/chromeos/system/pointer_device_observer.h" 76 #include "chrome/browser/chromeos/system/pointer_device_observer.h"
74 #include "chrome/browser/ui/webui/options/chromeos/accounts_options_handler.h" 77 #include "chrome/browser/ui/webui/options/chromeos/accounts_options_handler.h"
75 #include "chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.h" 78 #include "chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.h"
76 #include "chrome/browser/ui/webui/options/chromeos/change_picture_options_handle r.h" 79 #include "chrome/browser/ui/webui/options/chromeos/change_picture_options_handle r.h"
77 #include "chrome/browser/ui/webui/options/chromeos/consumer_management_handler.h " 80 #include "chrome/browser/ui/webui/options/chromeos/consumer_management_handler.h "
78 #include "chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler .h" 81 #include "chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler .h"
79 #include "chrome/browser/ui/webui/options/chromeos/cros_language_options_handler .h" 82 #include "chrome/browser/ui/webui/options/chromeos/cros_language_options_handler .h"
80 #include "chrome/browser/ui/webui/options/chromeos/date_time_options_handler.h" 83 #include "chrome/browser/ui/webui/options/chromeos/date_time_options_handler.h"
81 #include "chrome/browser/ui/webui/options/chromeos/display_options_handler.h" 84 #include "chrome/browser/ui/webui/options/chromeos/display_options_handler.h"
82 #include "chrome/browser/ui/webui/options/chromeos/display_overscan_handler.h" 85 #include "chrome/browser/ui/webui/options/chromeos/display_overscan_handler.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 new SupervisedUserLearnMoreHandler()); 300 new SupervisedUserLearnMoreHandler());
298 AddOptionsPageUIHandler(localized_strings, new SyncSetupHandler( 301 AddOptionsPageUIHandler(localized_strings, new SyncSetupHandler(
299 g_browser_process->profile_manager())); 302 g_browser_process->profile_manager()));
300 AddOptionsPageUIHandler(localized_strings, new WebsiteSettingsHandler()); 303 AddOptionsPageUIHandler(localized_strings, new WebsiteSettingsHandler());
301 #if defined(OS_CHROMEOS) 304 #if defined(OS_CHROMEOS)
302 AddOptionsPageUIHandler(localized_strings, 305 AddOptionsPageUIHandler(localized_strings,
303 new chromeos::options::AccountsOptionsHandler()); 306 new chromeos::options::AccountsOptionsHandler());
304 AddOptionsPageUIHandler(localized_strings, 307 AddOptionsPageUIHandler(localized_strings,
305 new chromeos::options::BluetoothOptionsHandler()); 308 new chromeos::options::BluetoothOptionsHandler());
306 AddOptionsPageUIHandler(localized_strings, 309 AddOptionsPageUIHandler(localized_strings,
307 new chromeos::options::ConsumerManagementHandler());
308 AddOptionsPageUIHandler(localized_strings,
309 new chromeos::options::DateTimeOptionsHandler()); 310 new chromeos::options::DateTimeOptionsHandler());
310 AddOptionsPageUIHandler(localized_strings, 311 AddOptionsPageUIHandler(localized_strings,
311 new chromeos::options::DisplayOptionsHandler()); 312 new chromeos::options::DisplayOptionsHandler());
312 AddOptionsPageUIHandler(localized_strings, 313 AddOptionsPageUIHandler(localized_strings,
313 new chromeos::options::DisplayOverscanHandler()); 314 new chromeos::options::DisplayOverscanHandler());
314 AddOptionsPageUIHandler(localized_strings, 315 AddOptionsPageUIHandler(localized_strings,
315 new chromeos::options::InternetOptionsHandler()); 316 new chromeos::options::InternetOptionsHandler());
316 AddOptionsPageUIHandler(localized_strings, 317 AddOptionsPageUIHandler(localized_strings,
317 new chromeos::options::KeyboardHandler()); 318 new chromeos::options::KeyboardHandler());
318 319
319 chromeos::options::PointerHandler* pointer_handler = 320 chromeos::options::PointerHandler* pointer_handler =
320 new chromeos::options::PointerHandler(); 321 new chromeos::options::PointerHandler();
321 AddOptionsPageUIHandler(localized_strings, pointer_handler); 322 AddOptionsPageUIHandler(localized_strings, pointer_handler);
322 323
323 AddOptionsPageUIHandler(localized_strings, 324 AddOptionsPageUIHandler(localized_strings,
324 new chromeos::options::ProxyHandler()); 325 new chromeos::options::ProxyHandler());
325 AddOptionsPageUIHandler( 326 AddOptionsPageUIHandler(
326 localized_strings, 327 localized_strings,
327 new chromeos::options::ChangePictureOptionsHandler()); 328 new chromeos::options::ChangePictureOptionsHandler());
328 AddOptionsPageUIHandler(localized_strings, 329 AddOptionsPageUIHandler(localized_strings,
329 new chromeos::options::StatsOptionsHandler()); 330 new chromeos::options::StatsOptionsHandler());
331
332 policy::ConsumerManagementService* management_service =
bartfab (slow) 2014/08/07 14:32:35 Nit: I suggested renaming |consumer_management| to
davidyu 2014/08/08 03:56:24 Done.
333 g_browser_process->platform_part()->browser_policy_connector_chromeos()->
334 GetConsumerManagementService();
335 chromeos::options::ConsumerManagementHandler* consumer_management_handler =
336 new chromeos::options::ConsumerManagementHandler(management_service);
337 AddOptionsPageUIHandler(localized_strings, consumer_management_handler);
330 #endif 338 #endif
331 #if defined(USE_NSS) 339 #if defined(USE_NSS)
332 AddOptionsPageUIHandler(localized_strings, 340 AddOptionsPageUIHandler(localized_strings,
333 new CertificateManagerHandler(false)); 341 new CertificateManagerHandler(false));
334 #endif 342 #endif
335 AddOptionsPageUIHandler(localized_strings, new HandlerOptionsHandler()); 343 AddOptionsPageUIHandler(localized_strings, new HandlerOptionsHandler());
336 344
337 web_ui->AddMessageHandler(new MetricsHandler()); 345 web_ui->AddMessageHandler(new MetricsHandler());
338 346
339 // |localized_strings| ownership is taken over by this constructor. 347 // |localized_strings| ownership is taken over by this constructor.
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 // Add only if handler's service is enabled. 464 // Add only if handler's service is enabled.
457 if (handler->IsEnabled()) { 465 if (handler->IsEnabled()) {
458 // Add handler to the list and also pass the ownership. 466 // Add handler to the list and also pass the ownership.
459 web_ui()->AddMessageHandler(handler.release()); 467 web_ui()->AddMessageHandler(handler.release());
460 handler_raw->GetLocalizedValues(localized_strings); 468 handler_raw->GetLocalizedValues(localized_strings);
461 handlers_.push_back(handler_raw); 469 handlers_.push_back(handler_raw);
462 } 470 }
463 } 471 }
464 472
465 } // namespace options 473 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698