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 @@
#include "base/bind.h"
#include "base/bind_helpers.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_thread.h"
#include "content/public/browser/storage_partition.h"
using content::BrowserThread;
using content::BrowserContext;
using content::BrowserThread;
BrowsingDataAppCacheHelper::BrowsingDataAppCacheHelper(Profile* profile)
BrowsingDataAppCacheHelper::BrowsingDataAppCacheHelper(
BrowserContext* browser_context)
: is_fetching_(false),
appcache_service_(BrowserContext::GetDefaultStoragePartition(profile)->
GetAppCacheService()) {
appcache_service_(BrowserContext::GetDefaultStoragePartition(
browser_context)->GetAppCacheService()) {
}
void BrowsingDataAppCacheHelper::StartFetching(const base::Closure& callback) {
......@@ -87,8 +86,8 @@ void BrowsingDataAppCacheHelper::OnFetchComplete(int rv) {
}
CannedBrowsingDataAppCacheHelper::CannedBrowsingDataAppCacheHelper(
Profile* profile)
: BrowsingDataAppCacheHelper(profile) {
BrowserContext* browser_context)
: BrowsingDataAppCacheHelper(browser_context) {
info_collection_ = new content::AppCacheInfoCollection;
}
......
......@@ -13,10 +13,8 @@
#include "net/base/completion_callback.h"
#include "url/gurl.h"
class Profile;
namespace content {
class AppCacheService;
class BrowserContext;
}
// This class fetches appcache information on behalf of a caller
......@@ -26,7 +24,7 @@ class BrowsingDataAppCacheHelper
public:
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 DeleteAppCacheGroup(const GURL& manifest_url);
......@@ -58,7 +56,8 @@ class BrowsingDataAppCacheHelper
// a parameter during construction.
class CannedBrowsingDataAppCacheHelper : public BrowsingDataAppCacheHelper {
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
// helper.
......
......@@ -8,8 +8,8 @@
#include "testing/gtest/include/gtest/gtest.h"
MockBrowsingDataAppCacheHelper::MockBrowsingDataAppCacheHelper(
Profile* profile)
: BrowsingDataAppCacheHelper(profile) {
content::BrowserContext* browser_context)
: BrowsingDataAppCacheHelper(browser_context) {
}
MockBrowsingDataAppCacheHelper::~MockBrowsingDataAppCacheHelper() {
......
......@@ -11,7 +11,8 @@
class MockBrowsingDataAppCacheHelper
: public BrowsingDataAppCacheHelper {
public:
explicit MockBrowsingDataAppCacheHelper(Profile* profile);
explicit MockBrowsingDataAppCacheHelper(
content::BrowserContext* browser_context);
virtual void StartFetching(const base::Closure& completion_callback) 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