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

Unified Diff: components/google/core/browser/google_url_tracker_unittest.cc

Issue 1918083002: Convert //components/[f-n]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: … 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: components/google/core/browser/google_url_tracker_unittest.cc
diff --git a/components/google/core/browser/google_url_tracker_unittest.cc b/components/google/core/browser/google_url_tracker_unittest.cc
index 03b34e242d241e8789fa7a8dbc1be3d7baa41fd7..944cb49ccf86d2f2131c6f45f652c1703fc9c9c5 100644
--- a/components/google/core/browser/google_url_tracker_unittest.cc
+++ b/components/google/core/browser/google_url_tracker_unittest.cc
@@ -4,11 +4,11 @@
#include "components/google/core/browser/google_url_tracker.h"
+#include <memory>
#include <string>
#include <utility>
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/thread_task_runner_handle.h"
#include "components/google/core/browser/google_pref_names.h"
#include "components/google/core/browser/google_url_tracker_client.h"
@@ -39,7 +39,8 @@ class TestCallbackListener {
void OnGoogleURLUpdated();
bool notified_;
- scoped_ptr<GoogleURLTracker::Subscription> google_url_updated_subscription_;
+ std::unique_ptr<GoogleURLTracker::Subscription>
+ google_url_updated_subscription_;
};
TestCallbackListener::TestCallbackListener() : notified_(false) {
@@ -135,10 +136,10 @@ class GoogleURLTrackerTest : public testing::Test {
// Creating this allows us to call
// net::NetworkChangeNotifier::NotifyObserversOfNetworkChangeForTests().
- scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_;
+ std::unique_ptr<net::NetworkChangeNotifier> network_change_notifier_;
net::TestURLFetcherFactory fetcher_factory_;
GoogleURLTrackerClient* client_;
- scoped_ptr<GoogleURLTracker> google_url_tracker_;
+ std::unique_ptr<GoogleURLTracker> google_url_tracker_;
TestCallbackListener listener_;
};
@@ -156,7 +157,7 @@ void GoogleURLTrackerTest::SetUp() {
// Ownership is passed to google_url_tracker_, but a weak pointer is kept;
// this is safe since GoogleURLTracker keeps the client for its lifetime.
client_ = new TestGoogleURLTrackerClient(&prefs_);
- scoped_ptr<GoogleURLTrackerClient> client(client_);
+ std::unique_ptr<GoogleURLTrackerClient> client(client_);
google_url_tracker_.reset(new GoogleURLTracker(
std::move(client), GoogleURLTracker::UNIT_TEST_MODE));
}
« no previous file with comments | « components/google/core/browser/google_url_tracker.cc ('k') | components/infobars/core/confirm_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698