Commit 0b803cd3 authored by vabr's avatar vabr Committed by Commit bot

Clean up BrowsingDataAppCacheHelper

Remove unused #includes, lower dependencies etc. in preparation for componentisation.

BUG=384873

Review URL: https://codereview.chromium.org/545243002

Cr-Commit-Position: refs/heads/master@{#295695}
parent 7dc2d89a
...@@ -7,19 +7,18 @@ ...@@ -7,19 +7,18 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/bind_helpers.h" #include "base/bind_helpers.h"
#include "chrome/browser/browsing_data/browsing_data_helper.h" #include "chrome/browser/browsing_data/browsing_data_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/browser_context.h" #include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/browser/storage_partition.h" #include "content/public/browser/storage_partition.h"
using content::BrowserThread;
using content::BrowserContext; using content::BrowserContext;
using content::BrowserThread;
BrowsingDataAppCacheHelper::BrowsingDataAppCacheHelper(Profile* profile) BrowsingDataAppCacheHelper::BrowsingDataAppCacheHelper(
BrowserContext* browser_context)
: is_fetching_(false), : is_fetching_(false),
appcache_service_(BrowserContext::GetDefaultStoragePartition(profile)-> appcache_service_(BrowserContext::GetDefaultStoragePartition(
GetAppCacheService()) { browser_context)->GetAppCacheService()) {
} }
void BrowsingDataAppCacheHelper::StartFetching(const base::Closure& callback) { void BrowsingDataAppCacheHelper::StartFetching(const base::Closure& callback) {
...@@ -87,8 +86,8 @@ void BrowsingDataAppCacheHelper::OnFetchComplete(int rv) { ...@@ -87,8 +86,8 @@ void BrowsingDataAppCacheHelper::OnFetchComplete(int rv) {
} }
CannedBrowsingDataAppCacheHelper::CannedBrowsingDataAppCacheHelper( CannedBrowsingDataAppCacheHelper::CannedBrowsingDataAppCacheHelper(
Profile* profile) BrowserContext* browser_context)
: BrowsingDataAppCacheHelper(profile) { : BrowsingDataAppCacheHelper(browser_context) {
info_collection_ = new content::AppCacheInfoCollection; info_collection_ = new content::AppCacheInfoCollection;
} }
......
...@@ -13,10 +13,8 @@ ...@@ -13,10 +13,8 @@
#include "net/base/completion_callback.h" #include "net/base/completion_callback.h"
#include "url/gurl.h" #include "url/gurl.h"
class Profile;
namespace content { namespace content {
class AppCacheService; class BrowserContext;
} }
// This class fetches appcache information on behalf of a caller // This class fetches appcache information on behalf of a caller
...@@ -26,7 +24,7 @@ class BrowsingDataAppCacheHelper ...@@ -26,7 +24,7 @@ class BrowsingDataAppCacheHelper
public: public:
typedef std::map<GURL, content::AppCacheInfoVector> OriginAppCacheInfoMap; typedef std::map<GURL, content::AppCacheInfoVector> OriginAppCacheInfoMap;
explicit BrowsingDataAppCacheHelper(Profile* profile); explicit BrowsingDataAppCacheHelper(content::BrowserContext* browser_context);
virtual void StartFetching(const base::Closure& completion_callback); virtual void StartFetching(const base::Closure& completion_callback);
virtual void DeleteAppCacheGroup(const GURL& manifest_url); virtual void DeleteAppCacheGroup(const GURL& manifest_url);
...@@ -58,7 +56,8 @@ class BrowsingDataAppCacheHelper ...@@ -58,7 +56,8 @@ class BrowsingDataAppCacheHelper
// a parameter during construction. // a parameter during construction.
class CannedBrowsingDataAppCacheHelper : public BrowsingDataAppCacheHelper { class CannedBrowsingDataAppCacheHelper : public BrowsingDataAppCacheHelper {
public: public:
explicit CannedBrowsingDataAppCacheHelper(Profile* profile); explicit CannedBrowsingDataAppCacheHelper(
content::BrowserContext* browser_context);
// Add an appcache to the set of canned caches that is returned by this // Add an appcache to the set of canned caches that is returned by this
// helper. // helper.
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
MockBrowsingDataAppCacheHelper::MockBrowsingDataAppCacheHelper( MockBrowsingDataAppCacheHelper::MockBrowsingDataAppCacheHelper(
Profile* profile) content::BrowserContext* browser_context)
: BrowsingDataAppCacheHelper(profile) { : BrowsingDataAppCacheHelper(browser_context) {
} }
MockBrowsingDataAppCacheHelper::~MockBrowsingDataAppCacheHelper() { MockBrowsingDataAppCacheHelper::~MockBrowsingDataAppCacheHelper() {
......
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
class MockBrowsingDataAppCacheHelper class MockBrowsingDataAppCacheHelper
: public BrowsingDataAppCacheHelper { : public BrowsingDataAppCacheHelper {
public: public:
explicit MockBrowsingDataAppCacheHelper(Profile* profile); explicit MockBrowsingDataAppCacheHelper(
content::BrowserContext* browser_context);
virtual void StartFetching(const base::Closure& completion_callback) OVERRIDE; virtual void StartFetching(const base::Closure& completion_callback) OVERRIDE;
virtual void DeleteAppCacheGroup(const GURL& manifest_url) OVERRIDE; virtual void DeleteAppCacheGroup(const GURL& manifest_url) OVERRIDE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment