OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/chromeos/cros/cros_library.h" | 9 #include "chrome/browser/chromeos/cros/cros_library.h" |
9 #include "chrome/browser/chromeos/cros/network_library.h" | 10 #include "chrome/browser/chromeos/cros/network_library.h" |
10 #include "grit/generated_resources.h" | 11 #include "grit/generated_resources.h" |
11 #include "grit/theme_resources.h" | 12 #include "grit/theme_resources.h" |
12 | 13 |
13 namespace chromeos { | 14 namespace chromeos { |
14 | 15 |
15 NetworkMessageObserver::NetworkMessageObserver(Profile* profile) | 16 NetworkMessageObserver::NetworkMessageObserver(Profile* profile) |
16 : notification_(profile, "network_connection.chromeos", | 17 : notification_(profile, "network_connection.chromeos", |
17 IDR_NOTIFICATION_NETWORK_FAILED, | 18 IDR_NOTIFICATION_NETWORK_FAILED, |
18 l10n_util::GetStringUTF16(IDS_NETWORK_CONNECTION_ERROR_TITLE)) { | 19 l10n_util::GetStringUTF16(IDS_NETWORK_CONNECTION_ERROR_TITLE)) { |
19 } | 20 } |
20 | 21 |
21 NetworkMessageObserver::~NetworkMessageObserver() { | 22 NetworkMessageObserver::~NetworkMessageObserver() { |
22 notification_.Hide(); | 23 notification_.Hide(); |
23 } | 24 } |
24 | 25 |
25 void NetworkMessageObserver::NetworkChanged(NetworkLibrary* obj) { | 26 void NetworkMessageObserver::NetworkChanged(NetworkLibrary* obj) { |
26 // TODO(chocobo): Display open networks notification here. | 27 // TODO(chocobo): Display open networks notification here. |
27 // notification_.Show(l10n_util::GetStringFUTF16( | 28 // notification_.Show(l10n_util::GetStringFUTF16( |
28 // IDS_NETWORK_CONNECTION_ERROR_MESSAGE, | 29 // IDS_NETWORK_CONNECTION_ERROR_MESSAGE, |
29 // ASCIIToUTF16(network.name())), true); | 30 // ASCIIToUTF16(network.name())), true); |
30 } | 31 } |
31 | 32 |
32 } // namespace chromeos | 33 } // namespace chromeos |
OLD | NEW |