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

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

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 side-by-side diff with in-line comments
Download patch
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 6d47a14c1053601393f55f2c5ab34917acc1888d..00801614db88d080eee4860ecd4d94508eabb4b3 100644
--- a/chrome/browser/chromeos/net/network_portal_notification_controller.cc
+++ b/chrome/browser/chromeos/net/network_portal_notification_controller.cc
@@ -6,6 +6,7 @@
#include <stdint.h>
+#include <memory>
#include <vector>
#include "ash/shell.h"
@@ -15,7 +16,6 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram.h"
#include "base/strings/string16.h"
@@ -329,7 +329,7 @@ void NetworkPortalNotificationController::OnDialogDestroyed(
}
}
-scoped_ptr<message_center::Notification>
+std::unique_ptr<message_center::Notification>
NetworkPortalNotificationController::CreateDefaultCaptivePortalNotification(
const NetworkState* network) {
message_center::RichNotificationData data;
@@ -342,7 +342,7 @@ NetworkPortalNotificationController::CreateDefaultCaptivePortalNotification(
ash::system_notifier::kNotifierNetworkPortalDetector);
base::string16 notificationText;
bool is_wifi = NetworkTypePattern::WiFi().MatchesType(network->type());
- scoped_ptr<Notification> notification(new Notification(
+ std::unique_ptr<Notification> notification(new Notification(
message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId,
l10n_util::GetStringUTF16(
is_wifi ? IDS_PORTAL_DETECTION_NOTIFICATION_TITLE_WIFI
@@ -356,7 +356,8 @@ NetworkPortalNotificationController::CreateDefaultCaptivePortalNotification(
return notification;
}
-scoped_ptr<message_center::Notification> NetworkPortalNotificationController::
+std::unique_ptr<message_center::Notification>
+NetworkPortalNotificationController::
CreateCaptivePortalNotificationForExtension(
const NetworkState* network,
extensions::NetworkingConfigService* networking_config_service,
@@ -397,7 +398,7 @@ scoped_ptr<message_center::Notification> NetworkPortalNotificationController::
data.buttons.push_back(message_center::ButtonInfo(l10n_util::GetStringUTF16(
IDS_PORTAL_DETECTION_NOTIFICATION_BUTTON_PORTAL)));
}
- scoped_ptr<Notification> notification(new Notification(
+ std::unique_ptr<Notification> notification(new Notification(
message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId,
l10n_util::GetStringUTF16(IDS_PORTAL_DETECTION_NOTIFICATION_TITLE_WIFI),
notificationText, icon, base::string16() /* display_source */, GURL(),
@@ -406,7 +407,8 @@ scoped_ptr<message_center::Notification> NetworkPortalNotificationController::
return notification;
}
-scoped_ptr<Notification> NetworkPortalNotificationController::GetNotification(
+std::unique_ptr<Notification>
+NetworkPortalNotificationController::GetNotification(
const NetworkState* network,
const NetworkPortalDetector::CaptivePortalState& state) {
base::string16 notificationText;
« no previous file with comments | « chrome/browser/chromeos/net/network_portal_notification_controller.h ('k') | chrome/browser/chromeos/net/onc_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698