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

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

Issue 10689175: Refactored code for timezone settings. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressed comments. Moved chromeos specific code from browser_options_handler to separate file. Created 8 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
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/options2/browser_options_handler.h" 5 #include "chrome/browser/ui/webui/options2/browser_options_handler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 76 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
77 #include "ui/base/l10n/l10n_util.h" 77 #include "ui/base/l10n/l10n_util.h"
78 78
79 #if !defined(OS_CHROMEOS) 79 #if !defined(OS_CHROMEOS)
80 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" 80 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h"
81 #include "chrome/browser/ui/webui/options2/advanced_options_utils.h" 81 #include "chrome/browser/ui/webui/options2/advanced_options_utils.h"
82 #endif 82 #endif
83 83
84 #if defined(OS_CHROMEOS) 84 #if defined(OS_CHROMEOS)
85 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" 85 #include "chrome/browser/chromeos/accessibility/accessibility_util.h"
86 #include "chrome/browser/chromeos/cros_settings.h"
87 #include "chrome/browser/chromeos/login/user_manager.h" 86 #include "chrome/browser/chromeos/login/user_manager.h"
88 #include "chrome/browser/chromeos/options/take_photo_dialog.h" 87 #include "chrome/browser/chromeos/options/take_photo_dialog.h"
89 #include "chrome/browser/chromeos/system_settings_provider.h"
90 #include "chrome/browser/ui/browser_window.h" 88 #include "chrome/browser/ui/browser_window.h"
89 #include "chrome/browser/ui/webui/options2/chromeos/timezone_options_util.h"
91 #include "ui/gfx/image/image_skia.h" 90 #include "ui/gfx/image/image_skia.h"
92 #endif // defined(OS_CHROMEOS) 91 #endif // defined(OS_CHROMEOS)
93 92
94 #if defined(OS_WIN) 93 #if defined(OS_WIN)
95 #include "chrome/installer/util/auto_launch_util.h" 94 #include "chrome/installer/util/auto_launch_util.h"
96 #endif // defined(OS_WIN) 95 #endif // defined(OS_WIN)
97 96
98 #if defined(TOOLKIT_GTK) 97 #if defined(TOOLKIT_GTK)
99 #include "chrome/browser/ui/gtk/gtk_theme_service.h" 98 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
100 #endif // defined(TOOLKIT_GTK) 99 #endif // defined(TOOLKIT_GTK)
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 "languageSectionLabel", 377 "languageSectionLabel",
379 l10n_util::GetStringFUTF16( 378 l10n_util::GetStringFUTF16(
380 IDS_OPTIONS_ADVANCED_LANGUAGE_LABEL, 379 IDS_OPTIONS_ADVANCED_LANGUAGE_LABEL,
381 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME))); 380 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)));
382 381
383 #if defined(OS_CHROMEOS) 382 #if defined(OS_CHROMEOS)
384 values->SetString("cloudPrintLearnMoreURL", chrome::kCloudPrintLearnMoreURL); 383 values->SetString("cloudPrintLearnMoreURL", chrome::kCloudPrintLearnMoreURL);
385 384
386 // TODO(pastarmovj): replace this with a call to the CrosSettings list 385 // TODO(pastarmovj): replace this with a call to the CrosSettings list
387 // handling functionality to come. 386 // handling functionality to come.
388 values->Set("timezoneList", 387 values->Set("timezoneList", GetTimezoneList());
389 static_cast<chromeos::SystemSettingsProvider*>(
390 chromeos::CrosSettings::Get()->GetProvider(
391 chromeos::kSystemTimezone))->GetTimezoneList());
392 #endif 388 #endif
393 #if defined(OS_MACOSX) 389 #if defined(OS_MACOSX)
394 values->SetString("macPasswordsWarning", 390 values->SetString("macPasswordsWarning",
395 l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_MAC_WARNING)); 391 l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_MAC_WARNING));
396 values->SetBoolean("multiple_profiles", 392 values->SetBoolean("multiple_profiles",
397 g_browser_process->profile_manager()->GetNumberOfProfiles() > 1); 393 g_browser_process->profile_manager()->GetNumberOfProfiles() > 1);
398 #endif 394 #endif
399 395
400 if (multiprofile_) 396 if (multiprofile_)
401 values->Set("profilesInfo", GetProfilesInfoList().release()); 397 values->Set("profilesInfo", GetProfilesInfoList().release());
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after
1443 } 1439 }
1444 1440
1445 void BrowserOptionsHandler::SetupSSLConfigSettings() { 1441 void BrowserOptionsHandler::SetupSSLConfigSettings() {
1446 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); 1442 base::FundamentalValue checked(rev_checking_enabled_.GetValue());
1447 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); 1443 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged());
1448 web_ui()->CallJavascriptFunction( 1444 web_ui()->CallJavascriptFunction(
1449 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); 1445 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled);
1450 } 1446 }
1451 1447
1452 } // namespace options2 1448 } // namespace options2
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698