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

Unified Diff: chrome/browser/safe_browsing/client_side_model_loader_unittest.cc

Issue 1870003002: Convert //chrome/browser/safe_browsing 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: chrome/browser/safe_browsing/client_side_model_loader_unittest.cc
diff --git a/chrome/browser/safe_browsing/client_side_model_loader_unittest.cc b/chrome/browser/safe_browsing/client_side_model_loader_unittest.cc
index 423e3c08d2c0d3f2a212d8d3d54da864fc3228e1..f26f46f8ae208e3e1abacf12f56992ac29259d3a 100644
--- a/chrome/browser/safe_browsing/client_side_model_loader_unittest.cc
+++ b/chrome/browser/safe_browsing/client_side_model_loader_unittest.cc
@@ -2,19 +2,20 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "chrome/browser/safe_browsing/client_side_model_loader.h"
+
#include <stdint.h>
#include <map>
+#include <memory>
#include <string>
#include "base/callback.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/metrics/field_trial.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/time/time.h"
-#include "chrome/browser/safe_browsing/client_side_model_loader.h"
#include "chrome/common/safe_browsing/client_model.pb.h"
#include "chrome/common/safe_browsing/csd.pb.h"
#include "components/variations/variations_associated_data.h"
@@ -95,8 +96,8 @@ class ModelLoaderTest : public testing::Test {
private:
content::TestBrowserThreadBundle thread_bundle_;
- scoped_ptr<net::FakeURLFetcherFactory> factory_;
- scoped_ptr<base::FieldTrialList> field_trials_;
+ std::unique_ptr<net::FakeURLFetcherFactory> factory_;
+ std::unique_ptr<base::FieldTrialList> field_trials_;
GURL model_url_;
};
@@ -286,7 +287,7 @@ TEST_F(ModelLoaderTest, ModelNamesTest) {
"client_model_v5_variation_5.pb");
// No Finch setup. Should default to 0.
- scoped_ptr<ModelLoader> loader;
+ std::unique_ptr<ModelLoader> loader;
loader.reset(new ModelLoader(base::Closure(), NULL,
false /* is_extended_reporting */));
EXPECT_EQ(loader->name(), "client_model_v5_variation_0.pb");

Powered by Google App Engine
This is Rietveld 408576698