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

Unified Diff: chrome/test/base/testing_profile.cc

Issue 2898443002: Implement GetBrowsingDataRemoverDelegate() for BrowserContext subclasses (Closed)
Patch Set: More fixes. Created 3 years, 7 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
« no previous file with comments | « chrome/test/base/testing_profile.h ('k') | chromecast/browser/cast_browser_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/testing_profile.cc
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index c43d29fdee2dbfb04d59119c832b39124fcdedb7..dc179ef38a88367054a6091a32aa4ae58e5f279c 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -24,6 +24,8 @@
#include "chrome/browser/bookmarks/chrome_bookmark_client.h"
#include "chrome/browser/bookmarks/managed_bookmark_service_factory.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h"
+#include "chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_factory.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/favicon/chrome_fallback_icon_client_factory.h"
@@ -983,6 +985,19 @@ TestingProfile::GetBackgroundSyncController() {
return nullptr;
}
+content::BrowsingDataRemoverDelegate*
+TestingProfile::GetBrowsingDataRemoverDelegate() {
+ // TestingProfile contains a real BrowsingDataRemover from BrowserContext.
+ // Since ChromeBrowsingDataRemoverDelegate is just a Chrome-specific extension
+ // of BrowsingDataRemover, we include it here for consistency.
+ //
+ // This is not a problem, since ChromeBrowsingDataRemoverDelegate mostly
+ // just serves as an interface to deletion mechanisms of various browsing
+ // data backends, which are already mocked if considered too heavy-weight
+ // for TestingProfile.
+ return ChromeBrowsingDataRemoverDelegateFactory::GetForProfile(this);
+}
+
net::URLRequestContextGetter* TestingProfile::CreateRequestContext(
content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) {
« no previous file with comments | « chrome/test/base/testing_profile.h ('k') | chromecast/browser/cast_browser_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698