| OLD | NEW |
| 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/chromeos/network_message_observer.h" | 5 #include "chrome/browser/chromeos/network_message_observer.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/shell_delegate.h" | 9 #include "ash/shell_delegate.h" |
| 10 #include "ash/system/network/network_observer.h" | 10 #include "ash/system/network/network_observer.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 icon_id = IDR_NOTIFICATION_BARS_CRITICAL; | 62 icon_id = IDR_NOTIFICATION_BARS_CRITICAL; |
| 63 title_ = l10n_util::GetStringUTF16(IDS_NETWORK_LOW_DATA_TITLE); | 63 title_ = l10n_util::GetStringUTF16(IDS_NETWORK_LOW_DATA_TITLE); |
| 64 break; | 64 break; |
| 65 case ash::NetworkObserver::ERROR_DATA_NONE: | 65 case ash::NetworkObserver::ERROR_DATA_NONE: |
| 66 id = "network_no_data.chromeos"; | 66 id = "network_no_data.chromeos"; |
| 67 icon_id = IDR_NOTIFICATION_BARS_EMPTY; | 67 icon_id = IDR_NOTIFICATION_BARS_EMPTY; |
| 68 title_ = l10n_util::GetStringUTF16(IDS_NETWORK_OUT_OF_DATA_TITLE); | 68 title_ = l10n_util::GetStringUTF16(IDS_NETWORK_OUT_OF_DATA_TITLE); |
| 69 break; | 69 break; |
| 70 } | 70 } |
| 71 DCHECK(!id.empty()); | 71 DCHECK(!id.empty()); |
| 72 if (CommandLine::ForCurrentProcess()->HasSwitch( | 72 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 73 ash::switches::kAshNotifyDisabled)) { | 73 ash::switches::kAshNotify)) { |
| 74 system_notification_.reset( | 74 system_notification_.reset( |
| 75 new SystemNotification(profile, id, icon_id, title_)); | 75 new SystemNotification(profile, id, icon_id, title_)); |
| 76 } | 76 } |
| 77 } | 77 } |
| 78 | 78 |
| 79 // Overridden from ash::NetworkTrayDelegate: | 79 // Overridden from ash::NetworkTrayDelegate: |
| 80 virtual void NotificationLinkClicked() { | 80 virtual void NotificationLinkClicked() { |
| 81 base::ListValue empty_value; | 81 base::ListValue empty_value; |
| 82 if (!callback_.is_null()) | 82 if (!callback_.is_null()) |
| 83 callback_.Run(&empty_value); | 83 callback_.Run(&empty_value); |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 if (plan) { | 388 if (plan) { |
| 389 cellular_data_plan_unique_id_ = plan->GetUniqueIdentifier(); | 389 cellular_data_plan_unique_id_ = plan->GetUniqueIdentifier(); |
| 390 cellular_data_plan_type_ = plan->plan_type; | 390 cellular_data_plan_type_ = plan->plan_type; |
| 391 } else { | 391 } else { |
| 392 cellular_data_plan_unique_id_ = std::string(); | 392 cellular_data_plan_unique_id_ = std::string(); |
| 393 cellular_data_plan_type_ = CELLULAR_DATA_PLAN_UNKNOWN; | 393 cellular_data_plan_type_ = CELLULAR_DATA_PLAN_UNKNOWN; |
| 394 } | 394 } |
| 395 } | 395 } |
| 396 | 396 |
| 397 } // namespace chromeos | 397 } // namespace chromeos |
| OLD | NEW |