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

Side by Side Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc

Issue 247663003: Date and Time dialog for when the clock isn't synced. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Set Time Dialog Created 6 years, 8 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 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/ash/system_tray_delegate_chromeos.h" 5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 #include "chrome/browser/chromeos/login/startup_utils.h" 61 #include "chrome/browser/chromeos/login/startup_utils.h"
62 #include "chrome/browser/chromeos/login/supervised_user_manager.h" 62 #include "chrome/browser/chromeos/login/supervised_user_manager.h"
63 #include "chrome/browser/chromeos/login/user.h" 63 #include "chrome/browser/chromeos/login/user.h"
64 #include "chrome/browser/chromeos/login/user_adding_screen.h" 64 #include "chrome/browser/chromeos/login/user_adding_screen.h"
65 #include "chrome/browser/chromeos/login/user_manager.h" 65 #include "chrome/browser/chromeos/login/user_manager.h"
66 #include "chrome/browser/chromeos/net/network_portal_detector.h" 66 #include "chrome/browser/chromeos/net/network_portal_detector.h"
67 #include "chrome/browser/chromeos/options/network_config_view.h" 67 #include "chrome/browser/chromeos/options/network_config_view.h"
68 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 68 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
69 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" 69 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
70 #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h" 70 #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h"
71 #include "chrome/browser/chromeos/set_time_dialog.h"
71 #include "chrome/browser/chromeos/settings/cros_settings.h" 72 #include "chrome/browser/chromeos/settings/cros_settings.h"
72 #include "chrome/browser/chromeos/sim_dialog_delegate.h" 73 #include "chrome/browser/chromeos/sim_dialog_delegate.h"
73 #include "chrome/browser/chromeos/ui/choose_mobile_network_dialog.h" 74 #include "chrome/browser/chromeos/ui/choose_mobile_network_dialog.h"
74 #include "chrome/browser/drive/drive_service_interface.h" 75 #include "chrome/browser/drive/drive_service_interface.h"
75 #include "chrome/browser/feedback/tracing_manager.h" 76 #include "chrome/browser/feedback/tracing_manager.h"
76 #include "chrome/browser/google/google_util.h" 77 #include "chrome/browser/google/google_util.h"
77 #include "chrome/browser/lifetime/application_lifetime.h" 78 #include "chrome/browser/lifetime/application_lifetime.h"
78 #include "chrome/browser/profiles/profile_manager.h" 79 #include "chrome/browser/profiles/profile_manager.h"
79 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" 80 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
80 #include "chrome/browser/ui/ash/stub_user_accounts_delegate.h" 81 #include "chrome/browser/ui/ash/stub_user_accounts_delegate.h"
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 void SystemTrayDelegateChromeOS::ShowSettings() { 476 void SystemTrayDelegateChromeOS::ShowSettings() {
476 ShowSettingsSubPageForActiveUser(""); 477 ShowSettingsSubPageForActiveUser("");
477 } 478 }
478 479
479 bool SystemTrayDelegateChromeOS::ShouldShowSettings() { 480 bool SystemTrayDelegateChromeOS::ShouldShowSettings() {
480 return UserManager::Get()->GetCurrentUserFlow()->ShouldShowSettings(); 481 return UserManager::Get()->GetCurrentUserFlow()->ShouldShowSettings();
481 } 482 }
482 483
483 void SystemTrayDelegateChromeOS::ShowDateSettings() { 484 void SystemTrayDelegateChromeOS::ShowDateSettings() {
484 content::RecordAction(base::UserMetricsAction("ShowDateOptions")); 485 content::RecordAction(base::UserMetricsAction("ShowDateOptions"));
485 std::string sub_page = 486
486 std::string(chrome::kSearchSubPage) + "#" +
487 l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME);
488 // Everybody can change the time zone (even though it is a device setting). 487 // Everybody can change the time zone (even though it is a device setting).
489 ShowSettingsSubPageForActiveUser(sub_page); 488 if (GetUserLoginStatus() == ash::user::LOGGED_IN_LOCKED ||
489 GetUserLoginStatus() == ash::user::LOGGED_IN_NONE) {
stevenjb 2014/04/23 21:32:04 nit: Only call GetUserLoginStatus() once.
michaelpg 2014/04/24 01:32:23 Done.
490 SetTimeDialog::ShowDialog(GetNativeWindow());
stevenjb 2014/04/23 21:32:04 Early exit
michaelpg 2014/04/24 01:32:23 Done.
491 } else {
492 std::string sub_page =
493 std::string(chrome::kSearchSubPage) + "#" +
494 l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME);
495 ShowSettingsSubPageForActiveUser(sub_page);
496 }
490 } 497 }
491 498
492 void SystemTrayDelegateChromeOS::ShowNetworkSettings( 499 void SystemTrayDelegateChromeOS::ShowNetworkSettings(
493 const std::string& service_path) { 500 const std::string& service_path) {
494 if (!LoginState::Get()->IsUserLoggedIn()) 501 if (!LoginState::Get()->IsUserLoggedIn())
495 return; 502 return;
496 ShowNetworkSettingsPage(service_path); 503 ShowNetworkSettingsPage(service_path);
497 } 504 }
498 505
499 void SystemTrayDelegateChromeOS::ShowBluetoothSettings() { 506 void SystemTrayDelegateChromeOS::ShowBluetoothSettings() {
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
1419 accessibility_subscription_.reset(); 1426 accessibility_subscription_.reset();
1420 else 1427 else
1421 OnAccessibilityModeChanged(details.notify); 1428 OnAccessibilityModeChanged(details.notify);
1422 } 1429 }
1423 1430
1424 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1431 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1425 return new SystemTrayDelegateChromeOS(); 1432 return new SystemTrayDelegateChromeOS();
1426 } 1433 }
1427 1434
1428 } // namespace chromeos 1435 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698