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

Unified Diff: chrome/browser/chromeos/net/network_portal_notification_controller.cc

Issue 879793002: Make ChromeOS captive portal notification text same as desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/chromeos_strings.grdp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/net/network_portal_notification_controller.cc
diff --git a/chrome/browser/chromeos/net/network_portal_notification_controller.cc b/chrome/browser/chromeos/net/network_portal_notification_controller.cc
index deeeceb1d7990712695e83b81daea3d9e58a6758..24aac64e3b49ece532ff1ebcdb3de93c7e474c7a 100644
--- a/chrome/browser/chromeos/net/network_portal_notification_controller.cc
+++ b/chrome/browser/chromeos/net/network_portal_notification_controller.cc
@@ -29,6 +29,7 @@
#include "chrome/grit/theme_resources.h"
#include "chromeos/chromeos_switches.h"
#include "chromeos/network/network_state.h"
+#include "chromeos/network/network_type_pattern.h"
#include "components/captive_portal/captive_portal_detector.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
@@ -183,11 +184,18 @@ void NetworkPortalNotificationController::OnPortalDetectionCompleted(
message_center::NotifierId::SYSTEM_COMPONENT,
ash::system_notifier::kNotifierNetworkPortalDetector);
+ bool is_wifi = NetworkTypePattern::WiFi().MatchesType(network->type());
scoped_ptr<Notification> notification(new Notification(
message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId,
- l10n_util::GetStringUTF16(IDS_PORTAL_DETECTION_NOTIFICATION_TITLE),
- l10n_util::GetStringFUTF16(IDS_PORTAL_DETECTION_NOTIFICATION_MESSAGE,
- base::UTF8ToUTF16(network->name())),
+ l10n_util::GetStringUTF16(
+ is_wifi ?
+ IDS_PORTAL_DETECTION_NOTIFICATION_TITLE_WIFI :
+ IDS_PORTAL_DETECTION_NOTIFICATION_TITLE_WIRED),
+ l10n_util::GetStringFUTF16(
+ is_wifi ?
+ IDS_PORTAL_DETECTION_NOTIFICATION_MESSAGE_WIFI :
+ IDS_PORTAL_DETECTION_NOTIFICATION_MESSAGE_WIRED,
+ base::UTF8ToUTF16(network->name())),
icon, base::string16() /* display_source */, notifier_id,
message_center::RichNotificationData(),
new NetworkPortalNotificationControllerDelegate(AsWeakPtr())));
« no previous file with comments | « chrome/app/chromeos_strings.grdp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698