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

Unified Diff: chrome/browser/browsing_data_local_storage_helper.cc

Issue 9419033: Move creation of BrowserContext objects that live in content to content, instead of depending on th… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fix memory leaks in tests Created 8 years, 10 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/browsing_data_local_storage_helper.cc
===================================================================
--- chrome/browser/browsing_data_local_storage_helper.cc (revision 122721)
+++ chrome/browser/browsing_data_local_storage_helper.cc (working copy)
@@ -17,6 +17,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "webkit/glue/webkit_glue.h"
+using content::BrowserContext;
using content::BrowserThread;
using WebKit::WebSecurityOrigin;
@@ -89,7 +90,7 @@
void BrowsingDataLocalStorageHelper::FetchLocalStorageInfoInWebKitThread() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED));
file_util::FileEnumerator file_enumerator(
- profile_->GetWebKitContext()->data_path().Append(
+ BrowserContext::GetWebKitContext(profile_)->data_path().Append(
DOMStorageContext::kLocalStorageDirectory),
false, file_util::FileEnumerator::FILES);
for (FilePath file_path = file_enumerator.Next(); !file_path.empty();
@@ -139,8 +140,8 @@
void BrowsingDataLocalStorageHelper::DeleteLocalStorageFileInWebKitThread(
const FilePath& file_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED));
- profile_->GetWebKitContext()->dom_storage_context()->DeleteLocalStorageFile(
- file_path);
+ BrowserContext::GetWebKitContext(profile_)->dom_storage_context()->
+ DeleteLocalStorageFile(file_path);
}
CannedBrowsingDataLocalStorageHelper::CannedBrowsingDataLocalStorageHelper(
@@ -221,7 +222,7 @@
web_security_origin.port(),
web_security_origin.databaseIdentifier().utf8(),
security_origin,
- profile_->GetWebKitContext()->dom_storage_context()->
+ BrowserContext::GetWebKitContext(profile_)->dom_storage_context()->
GetLocalStorageFilePath(web_security_origin.databaseIdentifier()),
0,
base::Time()));
« no previous file with comments | « chrome/browser/browsing_data_indexed_db_helper.cc ('k') | chrome/browser/browsing_data_quota_helper_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698