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

Unified Diff: chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl_unittest.cc

Issue 1165913002: [Cleanup] Used scoped pointers in KeyedServiceFactory's SetTestingFactory functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Finish renaming profile -> context Created 5 years, 6 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/policy/affiliated_invalidation_service_provider_impl_unittest.cc
diff --git a/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl_unittest.cc b/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl_unittest.cc
index dedc6b4398dbb61aeef02e91ec57897ff42c8281..5918728e2c0c1ad44823605c3d5fd6b398cecad3 100644
--- a/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl_unittest.cc
+++ b/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl_unittest.cc
@@ -6,6 +6,7 @@
#include <string>
+#include "base/memory/scoped_ptr.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h"
#include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h"
@@ -41,14 +42,14 @@ const char kAffiliatedUserID1[] = "test_1@example.com";
const char kAffiliatedUserID2[] = "test_2@example.com";
const char kUnaffiliatedUserID[] = "test@other_domain.test";
-KeyedService* BuildProfileInvalidationProvider(
+scoped_ptr<KeyedService> BuildProfileInvalidationProvider(
content::BrowserContext* context) {
scoped_ptr<invalidation::FakeInvalidationService> invalidation_service(
new invalidation::FakeInvalidationService);
invalidation_service->SetInvalidatorState(
syncer::TRANSIENT_INVALIDATION_ERROR);
- return new invalidation::ProfileInvalidationProvider(
- invalidation_service.Pass());
+ return make_scoped_ptr(new invalidation::ProfileInvalidationProvider(
+ invalidation_service.Pass()));
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698