summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authormichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-06 19:41:36 +0000
committermichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-06 19:41:36 +0000
commitece8a8505d789a77fae45cb0575136040018602b (patch)
tree1b8425ca47ac54ad65d23d4a45a692203163c05f /content
parent56f9697e2e4a4c79187f3a87f65988db51aa9528 (diff)
downloadchromium_src-ece8a8505d789a77fae45cb0575136040018602b.zip
chromium_src-ece8a8505d789a77fae45cb0575136040018602b.tar.gz
chromium_src-ece8a8505d789a77fae45cb0575136040018602b.tar.bz2
Get rid of some more dependencies on /chrome.
BUG=76788 TEST=n/a Review URL: http://codereview.chromium.org/6798004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80675 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/appcache/chrome_appcache_service.cc6
-rw-r--r--content/browser/appcache/chrome_appcache_service.h2
-rw-r--r--content/browser/appcache/chrome_appcache_service_unittest.cc4
-rw-r--r--content/browser/in_process_webkit/indexed_db_dispatcher_host.cc10
-rw-r--r--content/browser/in_process_webkit/indexed_db_dispatcher_host.h6
5 files changed, 14 insertions, 14 deletions
diff --git a/content/browser/appcache/chrome_appcache_service.cc b/content/browser/appcache/chrome_appcache_service.cc
index 132037f..0e8a0f0 100644
--- a/content/browser/appcache/chrome_appcache_service.cc
+++ b/content/browser/appcache/chrome_appcache_service.cc
@@ -6,7 +6,6 @@
#include "base/file_path.h"
#include "base/file_util.h"
-#include "chrome/common/chrome_constants.h"
#include "content/common/notification_service.h"
#include "net/base/net_errors.h"
#include "webkit/appcache/appcache_thread.h"
@@ -34,7 +33,7 @@ ChromeAppCacheService::ChromeAppCacheService()
}
void ChromeAppCacheService::InitializeOnIOThread(
- const FilePath& profile_path, bool is_incognito,
+ const FilePath& cache_path,
scoped_refptr<HostContentSettingsMap> content_settings_map,
scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy,
bool clear_local_state_on_exit) {
@@ -45,12 +44,11 @@ void ChromeAppCacheService::InitializeOnIOThread(
appcache::AppCacheThread::Init(BrowserThread::DB, BrowserThread::IO);
}
+ cache_path_ = cache_path;
host_contents_settings_map_ = content_settings_map;
registrar_.Add(
this, NotificationType::PURGE_MEMORY, NotificationService::AllSources());
SetClearLocalStateOnExit(clear_local_state_on_exit);
- if (!is_incognito)
- cache_path_ = profile_path.Append(chrome::kAppCacheDirname);
// Init our base class.
Initialize(cache_path_,
diff --git a/content/browser/appcache/chrome_appcache_service.h b/content/browser/appcache/chrome_appcache_service.h
index 3308d84..8314e48 100644
--- a/content/browser/appcache/chrome_appcache_service.h
+++ b/content/browser/appcache/chrome_appcache_service.h
@@ -35,7 +35,7 @@ class ChromeAppCacheService
ChromeAppCacheService();
void InitializeOnIOThread(
- const FilePath& profile_path, bool is_incognito,
+ const FilePath& cache_path, // may be empty to use in-memory structures
scoped_refptr<HostContentSettingsMap> content_settings_map,
scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy,
bool clear_local_state_on_exit);
diff --git a/content/browser/appcache/chrome_appcache_service_unittest.cc b/content/browser/appcache/chrome_appcache_service_unittest.cc
index a327659..3e4a975 100644
--- a/content/browser/appcache/chrome_appcache_service_unittest.cc
+++ b/content/browser/appcache/chrome_appcache_service_unittest.cc
@@ -47,7 +47,7 @@ TEST_F(ChromeAppCacheServiceTest, KeepOnDestruction) {
BrowserThread::IO, FROM_HERE,
NewRunnableMethod(appcache_service.get(),
&ChromeAppCacheService::InitializeOnIOThread,
- temp_dir_.path(), false,
+ appcache_path,
scoped_refptr<HostContentSettingsMap>(NULL),
scoped_refptr<quota::SpecialStoragePolicy>(NULL),
false));
@@ -78,7 +78,7 @@ TEST_F(ChromeAppCacheServiceTest, RemoveOnDestruction) {
BrowserThread::IO, FROM_HERE,
NewRunnableMethod(appcache_service.get(),
&ChromeAppCacheService::InitializeOnIOThread,
- temp_dir_.path(), false,
+ appcache_path,
scoped_refptr<HostContentSettingsMap>(NULL),
scoped_refptr<quota::SpecialStoragePolicy>(NULL),
true));
diff --git a/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc b/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc
index 2f50f6d..b0305d7 100644
--- a/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc
+++ b/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc
@@ -8,7 +8,6 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/metrics/user_metrics.h"
-#include "chrome/browser/profiles/profile.h"
#include "content/browser/browser_thread.h"
#include "content/browser/in_process_webkit/indexed_db_callbacks.h"
#include "content/browser/in_process_webkit/indexed_db_database_callbacks.h"
@@ -61,10 +60,11 @@ void DeleteOnWebKitThread(T* obj) {
}
-IndexedDBDispatcherHost::IndexedDBDispatcherHost(int process_id,
- Profile* profile)
- : webkit_context_(profile->GetWebKitContext()),
- host_content_settings_map_(profile->GetHostContentSettingsMap()),
+IndexedDBDispatcherHost::IndexedDBDispatcherHost(
+ int process_id, WebKitContext* webkit_context,
+ HostContentSettingsMap* host_content_settings_map)
+ : webkit_context_(webkit_context),
+ host_content_settings_map_(host_content_settings_map),
ALLOW_THIS_IN_INITIALIZER_LIST(database_dispatcher_host_(
new DatabaseDispatcherHost(this))),
ALLOW_THIS_IN_INITIALIZER_LIST(index_dispatcher_host_(
diff --git a/content/browser/in_process_webkit/indexed_db_dispatcher_host.h b/content/browser/in_process_webkit/indexed_db_dispatcher_host.h
index f8dd3ce..da7869b 100644
--- a/content/browser/in_process_webkit/indexed_db_dispatcher_host.h
+++ b/content/browser/in_process_webkit/indexed_db_dispatcher_host.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -37,7 +37,9 @@ class WebIDBTransaction;
class IndexedDBDispatcherHost : public BrowserMessageFilter {
public:
// Only call the constructor from the UI thread.
- IndexedDBDispatcherHost(int process_id, Profile* profile);
+ IndexedDBDispatcherHost(
+ int process_id, WebKitContext* webkit_context,
+ HostContentSettingsMap* host_content_settings_map);
// BrowserMessageFilter implementation.
virtual void OnChannelClosing();