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

Unified Diff: chrome/browser/extensions/extension_webstore_private_api.cc

Issue 9169096: Remove a bunch of GetProfileSyncService callers to use the new factory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests + compile Created 8 years, 11 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/extensions/extension_webstore_private_api.cc
diff --git a/chrome/browser/extensions/extension_webstore_private_api.cc b/chrome/browser/extensions/extension_webstore_private_api.cc
index 61ef38ff26a27e264585ba60d26042da70f1a4ed..8f393a5e9ea18356d4063629d75fa73f0c9c93d2 100644
--- a/chrome/browser/extensions/extension_webstore_private_api.cc
+++ b/chrome/browser/extensions/extension_webstore_private_api.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/signin/token_service.h"
#include "chrome/browser/sync/profile_sync_service.h"
+#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
@@ -59,10 +60,12 @@ ProfileSyncService* test_sync_service = NULL;
// Returns either the test sync service, or the real one from |profile|.
ProfileSyncService* GetSyncService(Profile* profile) {
+ // TODO(webstore): It seems |test_sync_service| is not used anywhere. It
+ // should be removed.
if (test_sync_service)
return test_sync_service;
else
- return profile->GetProfileSyncService();
+ return ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile);
}
bool IsWebStoreURL(Profile* profile, const GURL& url) {
@@ -554,4 +557,3 @@ bool GetWebGLStatusFunction::RunImpl() {
}
return true;
}
-

Powered by Google App Engine
This is Rietveld 408576698