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

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

Issue 164333007: Switch guest profile from forced-incognito to UI mods like ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed review comments by msw Created 6 years, 10 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 | « chrome/browser/ui/webui/ntp/ntp_resource_cache.cc ('k') | 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 (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/browser_options_handler.h" 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "apps/shell_window.h" 10 #include "apps/shell_window.h"
(...skipping 1555 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 PrefService* pref_service = g_browser_process->local_state(); 1566 PrefService* pref_service = g_browser_process->local_state();
1567 base::FundamentalValue virtual_keyboard_enabled( 1567 base::FundamentalValue virtual_keyboard_enabled(
1568 pref_service->GetBoolean(prefs::kVirtualKeyboardEnabled)); 1568 pref_service->GetBoolean(prefs::kVirtualKeyboardEnabled));
1569 web_ui()->CallJavascriptFunction( 1569 web_ui()->CallJavascriptFunction(
1570 "BrowserOptions.setVirtualKeyboardCheckboxState", 1570 "BrowserOptions.setVirtualKeyboardCheckboxState",
1571 virtual_keyboard_enabled); 1571 virtual_keyboard_enabled);
1572 } 1572 }
1573 #endif 1573 #endif
1574 1574
1575 void BrowserOptionsHandler::SetupMetricsReportingSettingVisibility() { 1575 void BrowserOptionsHandler::SetupMetricsReportingSettingVisibility() {
1576 #if defined(GOOGLE_CHROME_BUILD) && defined(OS_CHROMEOS) 1576 #if defined(GOOGLE_CHROME_BUILD)
1577 // Don't show the reporting setting if we are in the guest mode. 1577 // Don't show the reporting setting if we are in the guest mode.
1578 if (CommandLine::ForCurrentProcess()->HasSwitch( 1578 if (Profile::FromWebUI(web_ui())->IsGuestSession()) {
1579 chromeos::switches::kGuestSession)) {
1580 base::FundamentalValue visible(false); 1579 base::FundamentalValue visible(false);
1581 web_ui()->CallJavascriptFunction( 1580 web_ui()->CallJavascriptFunction(
1582 "BrowserOptions.setMetricsReportingSettingVisibility", visible); 1581 "BrowserOptions.setMetricsReportingSettingVisibility", visible);
1583 } 1582 }
1584 #endif 1583 #endif
1585 } 1584 }
1586 1585
1587 void BrowserOptionsHandler::SetupFontSizeSelector() { 1586 void BrowserOptionsHandler::SetupFontSizeSelector() {
1588 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); 1587 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
1589 const PrefService::Preference* default_font_size = 1588 const PrefService::Preference* default_font_size =
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1705 void BrowserOptionsHandler::SetupManagingSupervisedUsers() { 1704 void BrowserOptionsHandler::SetupManagingSupervisedUsers() {
1706 bool has_users = !Profile::FromWebUI(web_ui())-> 1705 bool has_users = !Profile::FromWebUI(web_ui())->
1707 GetPrefs()->GetDictionary(prefs::kManagedUsers)->empty(); 1706 GetPrefs()->GetDictionary(prefs::kManagedUsers)->empty();
1708 base::FundamentalValue has_users_value(has_users); 1707 base::FundamentalValue has_users_value(has_users);
1709 web_ui()->CallJavascriptFunction( 1708 web_ui()->CallJavascriptFunction(
1710 "BrowserOptions.updateManagesSupervisedUsers", 1709 "BrowserOptions.updateManagesSupervisedUsers",
1711 has_users_value); 1710 has_users_value);
1712 } 1711 }
1713 1712
1714 } // namespace options 1713 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/ntp_resource_cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698