diff options
author | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-05 23:40:02 +0000 |
---|---|---|
committer | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-05 23:40:02 +0000 |
commit | d68a4fc6f448c6ebf407e2817320e7736c4735ee (patch) | |
tree | d76e2c91aa67af5a880ec81eddcbf2d12887e865 /chrome | |
parent | 63eb6c0bebc31046bbd954ef21dee86dca9d7fe3 (diff) | |
download | chromium_src-d68a4fc6f448c6ebf407e2817320e7736c4735ee.zip chromium_src-d68a4fc6f448c6ebf407e2817320e7736c4735ee.tar.gz chromium_src-d68a4fc6f448c6ebf407e2817320e7736c4735ee.tar.bz2 |
Hook up the content settings UI to the appcache.
* Populate the tree view with appcaches
* Delete selected appcaches from the tree view
* Delete the date range indicated in the browsing data remover
TEST=manual
BUG=34634
Review URL: http://codereview.chromium.org/660423
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40796 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/browsing_data_appcache_helper.cc | 96 | ||||
-rw-r--r-- | chrome/browser/browsing_data_appcache_helper.h | 39 | ||||
-rw-r--r-- | chrome/browser/browsing_data_remover.cc | 86 | ||||
-rw-r--r-- | chrome/browser/browsing_data_remover.h | 30 | ||||
-rw-r--r-- | chrome/browser/cookies_tree_model.cc | 29 | ||||
-rw-r--r-- | chrome/browser/cookies_tree_model.h | 11 | ||||
-rw-r--r-- | chrome/browser/gtk/gtk_chrome_cookie_view.cc | 2 | ||||
-rw-r--r-- | chrome/browser/gtk/gtk_chrome_cookie_view.h | 2 | ||||
-rw-r--r-- | chrome/browser/mock_browsing_data_appcache_helper.cc | 3 | ||||
-rw-r--r-- | chrome/browser/mock_browsing_data_appcache_helper.h | 2 | ||||
-rwxr-xr-x | chrome/browser/views/appcache_info_view.cc | 3 | ||||
-rwxr-xr-x | chrome/browser/views/appcache_info_view.h | 2 |
12 files changed, 206 insertions, 99 deletions
diff --git a/chrome/browser/browsing_data_appcache_helper.cc b/chrome/browser/browsing_data_appcache_helper.cc index c0d7ced..9e62809 100644 --- a/chrome/browser/browsing_data_appcache_helper.cc +++ b/chrome/browser/browsing_data_appcache_helper.cc @@ -3,55 +3,70 @@ // found in the LICENSE file. #include "chrome/browser/browsing_data_appcache_helper.h" +#include "chrome/browser/net/chrome_url_request_context.h" +#include "chrome/browser/profile.h" +#include "webkit/appcache/appcache_database.h" +#include "webkit/appcache/appcache_storage.h" + +using appcache::AppCacheDatabase; BrowsingDataAppCacheHelper::BrowsingDataAppCacheHelper(Profile* profile) - : is_fetching_(false) { + : request_context_getter_(profile->GetRequestContext()), + is_fetching_(false) { + DCHECK(request_context_getter_.get()); } void BrowsingDataAppCacheHelper::StartFetching(Callback0::Type* callback) { - DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); - DCHECK(!is_fetching_); - DCHECK(callback); - is_fetching_ = true; - info_list_.clear(); - completion_callback_.reset(callback); - ChromeThread::PostTask(ChromeThread::IO, FROM_HERE, NewRunnableMethod( - this, &BrowsingDataAppCacheHelper::StartFetchingInIOThread)); + if (ChromeThread::CurrentlyOn(ChromeThread::UI)) { + DCHECK(!is_fetching_); + DCHECK(callback); + is_fetching_ = true; + info_collection_ = new appcache::AppCacheInfoCollection; + completion_callback_.reset(callback); + ChromeThread::PostTask(ChromeThread::IO, FROM_HERE, NewRunnableMethod( + this, &BrowsingDataAppCacheHelper::StartFetching, callback)); + return; + } + + DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); + appcache_info_callback_ = + new net::CancelableCompletionCallback<BrowsingDataAppCacheHelper>( + this, &BrowsingDataAppCacheHelper::OnFetchComplete); + GetAppCacheService()->GetAllAppCacheInfo(info_collection_, + appcache_info_callback_); } void BrowsingDataAppCacheHelper::CancelNotification() { - DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); - completion_callback_.reset(); -} + if (ChromeThread::CurrentlyOn(ChromeThread::UI)) { + completion_callback_.reset(); + ChromeThread::PostTask(ChromeThread::IO, FROM_HERE, NewRunnableMethod( + this, &BrowsingDataAppCacheHelper::CancelNotification)); + return; + } -void BrowsingDataAppCacheHelper::DeleteAppCache(int64 group_id) { - DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); - ChromeThread::PostTask(ChromeThread::IO, FROM_HERE, NewRunnableMethod( - this, &BrowsingDataAppCacheHelper::DeleteAppCacheInIOThread, - group_id)); + if (appcache_info_callback_) + appcache_info_callback_.release()->Cancel(); } -void BrowsingDataAppCacheHelper::StartFetchingInIOThread() { - DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); - -#ifndef NDEBUG - // TODO(michaeln): get real data from the appcache service - info_list_.push_back( - AppCacheInfo(GURL("http://bogus/manifest"), - 1 * 1024 * 1024, base::Time::Now(), base::Time::Now(), 1)); - info_list_.push_back( - AppCacheInfo(GURL("https://bogus/manifest"), - 2 * 1024 * 1024, base::Time::Now(), base::Time::Now(), 2)); - info_list_.push_back( - AppCacheInfo(GURL("http://bogus:8080/manifest"), - 3 * 1024 * 1024, base::Time::Now(), base::Time::Now(), 3)); -#endif - - ChromeThread::PostTask(ChromeThread::UI, FROM_HERE, NewRunnableMethod( - this, &BrowsingDataAppCacheHelper::OnFetchComplete)); +void BrowsingDataAppCacheHelper::DeleteAppCacheGroup( + const GURL& manifest_url) { + if (ChromeThread::CurrentlyOn(ChromeThread::UI)) { + ChromeThread::PostTask(ChromeThread::IO, FROM_HERE, NewRunnableMethod( + this, &BrowsingDataAppCacheHelper::DeleteAppCacheGroup, + manifest_url)); + return; + } + GetAppCacheService()->DeleteAppCacheGroup(manifest_url, NULL); } -void BrowsingDataAppCacheHelper::OnFetchComplete() { +void BrowsingDataAppCacheHelper::OnFetchComplete(int rv) { + if (ChromeThread::CurrentlyOn(ChromeThread::IO)) { + appcache_info_callback_ = NULL; + ChromeThread::PostTask(ChromeThread::UI, FROM_HERE, NewRunnableMethod( + this, &BrowsingDataAppCacheHelper::OnFetchComplete, rv)); + return; + } + DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); DCHECK(is_fetching_); is_fetching_ = false; @@ -61,8 +76,11 @@ void BrowsingDataAppCacheHelper::OnFetchComplete() { } } -void BrowsingDataAppCacheHelper::DeleteAppCacheInIOThread( - int64 group_id) { +ChromeAppCacheService* BrowsingDataAppCacheHelper::GetAppCacheService() { DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); - // TODO(michaeln): plumb to the appcache service + ChromeURLRequestContext* request_context = + reinterpret_cast<ChromeURLRequestContext*>( + request_context_getter_->GetURLRequestContext()); + return request_context ? request_context->appcache_service() + : NULL; } diff --git a/chrome/browser/browsing_data_appcache_helper.h b/chrome/browser/browsing_data_appcache_helper.h index aa04dae..695a271 100644 --- a/chrome/browser/browsing_data_appcache_helper.h +++ b/chrome/browser/browsing_data_appcache_helper.h @@ -11,6 +11,7 @@ #include "base/scoped_ptr.h" #include "base/task.h" #include "chrome/browser/appcache/chrome_appcache_service.h" +#include "chrome/browser/net/url_request_context_getter.h" class Profile; @@ -19,37 +20,15 @@ class Profile; class BrowsingDataAppCacheHelper : public base::RefCountedThreadSafe<BrowsingDataAppCacheHelper> { public: - // Contains detailed information about an appcache. - struct AppCacheInfo { - AppCacheInfo() {} - AppCacheInfo(const GURL& manifest_url, - int64 size, - base::Time creation_time, - base::Time last_access_time, - int64 group_id) - : manifest_url(manifest_url), - size(size), - creation_time(creation_time), - last_access_time(last_access_time), - group_id(group_id) { - } - - GURL manifest_url; - int64 size; - base::Time creation_time; - base::Time last_access_time; - int64 group_id; - }; - explicit BrowsingDataAppCacheHelper(Profile* profile); virtual void StartFetching(Callback0::Type* completion_callback); virtual void CancelNotification(); - virtual void DeleteAppCache(int64 group_id); + virtual void DeleteAppCacheGroup(const GURL& manifest_url); - const std::vector<AppCacheInfo>& info_list() const { + appcache::AppCacheInfoCollection* info_collection() const { DCHECK(!is_fetching_); - return info_list_; + return info_collection_; } private: @@ -58,13 +37,15 @@ class BrowsingDataAppCacheHelper virtual ~BrowsingDataAppCacheHelper() {} - void StartFetchingInIOThread(); - void OnFetchComplete(); - void DeleteAppCacheInIOThread(int64 group_id); + void OnFetchComplete(int rv); + ChromeAppCacheService* GetAppCacheService(); + scoped_refptr<URLRequestContextGetter> request_context_getter_; bool is_fetching_; - std::vector<AppCacheInfo> info_list_; scoped_ptr<Callback0::Type> completion_callback_; + scoped_refptr<appcache::AppCacheInfoCollection> info_collection_; + scoped_refptr<net::CancelableCompletionCallback<BrowsingDataAppCacheHelper> > + appcache_info_callback_; DISALLOW_COPY_AND_ASSIGN(BrowsingDataAppCacheHelper); }; diff --git a/chrome/browser/browsing_data_remover.cc b/chrome/browser/browsing_data_remover.cc index b4468c7..0614969 100644 --- a/chrome/browser/browsing_data_remover.cc +++ b/chrome/browser/browsing_data_remover.cc @@ -11,6 +11,7 @@ #include "chrome/browser/in_process_webkit/webkit_context.h" #include "chrome/browser/profile.h" #include "chrome/browser/metrics/user_metrics.h" +#include "chrome/browser/net/chrome_url_request_context.h" #include "chrome/browser/net/url_request_context_getter.h" #include "chrome/browser/password_manager/password_store.h" #include "chrome/browser/search_engines/template_url_model.h" @@ -46,9 +47,16 @@ BrowsingDataRemover::BrowsingDataRemover(Profile* profile, delete_end_(delete_end), ALLOW_THIS_IN_INITIALIZER_LIST(database_cleared_callback_( this, &BrowsingDataRemover::OnClearedDatabases)), + ALLOW_THIS_IN_INITIALIZER_LIST(appcache_got_info_callback_( + this, &BrowsingDataRemover::OnGotAppCacheInfo)), + ALLOW_THIS_IN_INITIALIZER_LIST(appcache_deleted_callback_( + this, &BrowsingDataRemover::OnAppCacheDeleted)), + request_context_getter_(profile->GetRequestContext()), + appcaches_to_be_deleted_count_(0), waiting_for_clear_databases_(false), waiting_for_clear_history_(false), - waiting_for_clear_cache_(false) { + waiting_for_clear_cache_(false), + waiting_for_clear_appcache_(false) { DCHECK(profile); } @@ -60,9 +68,16 @@ BrowsingDataRemover::BrowsingDataRemover(Profile* profile, delete_end_(delete_end), ALLOW_THIS_IN_INITIALIZER_LIST(database_cleared_callback_( this, &BrowsingDataRemover::OnClearedDatabases)), + ALLOW_THIS_IN_INITIALIZER_LIST(appcache_got_info_callback_( + this, &BrowsingDataRemover::OnGotAppCacheInfo)), + ALLOW_THIS_IN_INITIALIZER_LIST(appcache_deleted_callback_( + this, &BrowsingDataRemover::OnAppCacheDeleted)), + request_context_getter_(profile->GetRequestContext()), + appcaches_to_be_deleted_count_(0), waiting_for_clear_databases_(false), waiting_for_clear_history_(false), - waiting_for_clear_cache_(false) { + waiting_for_clear_cache_(false), + waiting_for_clear_appcache_(false) { DCHECK(profile); } @@ -146,7 +161,13 @@ void BrowsingDataRemover::Remove(int remove_mask) { profile_->GetTransportSecurityState(); ts_state->DeleteSince(delete_begin_); - // TODO(michaeln): clear appcaches created in the date range + waiting_for_clear_appcache_ = true; + ChromeThread::PostTask( + ChromeThread::IO, FROM_HERE, + NewRunnableMethod( + this, + &BrowsingDataRemover::ClearAppCacheOnIOThread, + delete_begin_)); // we assume end time == now } if (remove_mask & REMOVE_PASSWORDS) { @@ -336,3 +357,62 @@ void BrowsingDataRemover::ClearDatabasesOnFILEThread(base::Time delete_begin) { if (rv != net::ERR_IO_PENDING) OnClearedDatabases(rv); } + +void BrowsingDataRemover::OnClearedAppCache() { + if (!ChromeThread::CurrentlyOn(ChromeThread::UI)) { + bool result = ChromeThread::PostTask( + ChromeThread::UI, FROM_HERE, + NewRunnableMethod(this, &BrowsingDataRemover::OnClearedAppCache)); + DCHECK(result); + return; + } + waiting_for_clear_appcache_ = false; + NotifyAndDeleteIfDone(); +} + +void BrowsingDataRemover::ClearAppCacheOnIOThread(base::Time delete_begin) { + DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); + DCHECK(waiting_for_clear_appcache_); + + appcache_info_ = new appcache::AppCacheInfoCollection; + GetAppCacheService()->GetAllAppCacheInfo( + appcache_info_, &appcache_got_info_callback_); + // continues in OnGotAppCacheInfo +} + +void BrowsingDataRemover::OnGotAppCacheInfo(int rv) { + using appcache::AppCacheInfoVector; + typedef std::map<GURL, AppCacheInfoVector> InfoByOrigin; + + for (InfoByOrigin::const_iterator origin = + appcache_info_->infos_by_origin.begin(); + origin != appcache_info_->infos_by_origin.end(); ++origin) { + for (AppCacheInfoVector::const_iterator info = origin->second.begin(); + info != origin->second.end(); ++info) { + if (info->creation_time > delete_begin_) { + ++appcaches_to_be_deleted_count_; + GetAppCacheService()->DeleteAppCacheGroup( + info->manifest_url, &appcache_deleted_callback_); + } + } + } + + if (!appcaches_to_be_deleted_count_) + OnClearedAppCache(); + // else continues in OnAppCacheDeleted +} + +void BrowsingDataRemover::OnAppCacheDeleted(int rv) { + --appcaches_to_be_deleted_count_; + if (!appcaches_to_be_deleted_count_) + OnClearedAppCache(); +} + +ChromeAppCacheService* BrowsingDataRemover::GetAppCacheService() { + DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); + ChromeURLRequestContext* request_context = + reinterpret_cast<ChromeURLRequestContext*>( + request_context_getter_->GetURLRequestContext()); + return request_context ? request_context->appcache_service() + : NULL; +} diff --git a/chrome/browser/browsing_data_remover.h b/chrome/browser/browsing_data_remover.h index 74ba60e..591427c 100644 --- a/chrome/browser/browsing_data_remover.h +++ b/chrome/browser/browsing_data_remover.h @@ -8,6 +8,7 @@ #include "base/observer_list.h" #include "base/scoped_ptr.h" #include "base/time.h" +#include "chrome/browser/appcache/chrome_appcache_service.h" #include "chrome/browser/cancelable_request.h" #include "chrome/common/notification_registrar.h" #include "webkit/database/database_tracker.h" @@ -104,13 +105,26 @@ class BrowsingDataRemover : public NotificationObserver { // Invoked on the FILE thread to delete HTML5 databases. void ClearDatabasesOnFILEThread(base::Time delete_begin); + // Callback when the appcache has been cleared. Invokes + // NotifyAndDeleteIfDone. + void OnClearedAppCache(); + + // Invoked on the IO thread to delete from the AppCache. + void ClearAppCacheOnIOThread(base::Time delete_begin); + + // Lower level helpers. + void OnGotAppCacheInfo(int rv); + void OnAppCacheDeleted(int rv); + ChromeAppCacheService* GetAppCacheService(); + // Calculate the begin time for the deletion range specified by |time_period|. base::Time CalculateBeginDeleteTime(TimePeriod time_period); // Returns true if we're all done. bool all_done() { return registrar_.IsEmpty() && !waiting_for_clear_cache_ && - !waiting_for_clear_history_ && !waiting_for_clear_databases_; + !waiting_for_clear_history_ && !waiting_for_clear_databases_ && + !waiting_for_clear_appcache_; } NotificationRegistrar registrar_; @@ -132,14 +146,18 @@ class BrowsingDataRemover : public NotificationObserver { net::CompletionCallbackImpl<BrowsingDataRemover> database_cleared_callback_; - // True if we're waiting for HTML5 databases to be deleted. - bool waiting_for_clear_databases_; + // Used to clear the appcache. + net::CompletionCallbackImpl<BrowsingDataRemover> appcache_got_info_callback_; + net::CompletionCallbackImpl<BrowsingDataRemover> appcache_deleted_callback_; + scoped_refptr<appcache::AppCacheInfoCollection> appcache_info_; + scoped_refptr<URLRequestContextGetter> request_context_getter_; + int appcaches_to_be_deleted_count_; - // True if we're waiting for the history to be deleted. + // True if we're waiting for various data to be deleted. + bool waiting_for_clear_databases_; bool waiting_for_clear_history_; - - // True if we're waiting for the cache to be cleared. bool waiting_for_clear_cache_; + bool waiting_for_clear_appcache_; ObserverList<Observer> observer_list_; diff --git a/chrome/browser/cookies_tree_model.cc b/chrome/browser/cookies_tree_model.cc index d884b11..3fd2fca 100644 --- a/chrome/browser/cookies_tree_model.cc +++ b/chrome/browser/cookies_tree_model.cc @@ -131,14 +131,15 @@ class OriginNodeComparator { // CookieTreeAppCacheNode, public: CookieTreeAppCacheNode::CookieTreeAppCacheNode( - const BrowsingDataAppCacheHelper::AppCacheInfo* appcache_info) + const appcache::AppCacheInfo* appcache_info) : CookieTreeNode(UTF8ToWide(appcache_info->manifest_url.spec())), appcache_info_(appcache_info) { } void CookieTreeAppCacheNode::DeleteStoredObjects() { DCHECK(GetModel()->appcache_helper_); - GetModel()->appcache_helper_->DeleteAppCache(appcache_info_->group_id); + GetModel()->appcache_helper_->DeleteAppCacheGroup( + appcache_info_->manifest_url); } /////////////////////////////////////////////////////////////////////////////// @@ -441,27 +442,37 @@ void CookiesTreeModel::RemoveObserver(Observer* observer) { } void CookiesTreeModel::OnAppCacheModelInfoLoaded() { + appcache_info_ = appcache_helper_->info_collection(); PopulateAppCacheInfoWithFilter(std::wstring()); } void CookiesTreeModel::PopulateAppCacheInfoWithFilter( const std::wstring& filter) { - if (!appcache_helper_ || appcache_helper_->info_list().empty()) + using appcache::AppCacheInfo; + using appcache::AppCacheInfoVector; + typedef std::map<GURL, AppCacheInfoVector> InfoByOrigin; + + if (!appcache_info_ || appcache_info_->infos_by_origin.empty()) return; + CookieTreeRootNode* root = static_cast<CookieTreeRootNode*>(GetRoot()); NotifyObserverBeginBatch(); - for (AppCacheInfoList::const_iterator info = - appcache_helper_->info_list().begin(); - info != appcache_helper_->info_list().end(); ++info) { - std::wstring origin_node_name = UTF8ToWide(info->manifest_url.host()); + for (InfoByOrigin::const_iterator origin = + appcache_info_->infos_by_origin.begin(); + origin != appcache_info_->infos_by_origin.end(); ++origin) { + std::wstring origin_node_name = UTF8ToWide(origin->first.host()); if (filter.empty() || (origin_node_name.find(filter) != std::wstring::npos)) { CookieTreeOriginNode* origin_node = root->GetOrCreateOriginNode(origin_node_name); CookieTreeAppCachesNode* appcaches_node = origin_node->GetOrCreateAppCachesNode(); - appcaches_node->AddAppCacheNode( - new CookieTreeAppCacheNode(&(*info))); + + for (AppCacheInfoVector::const_iterator info = origin->second.begin(); + info != origin->second.end(); ++info) { + appcaches_node->AddAppCacheNode( + new CookieTreeAppCacheNode(&(*info))); + } } } NotifyObserverTreeNodeChanged(root); diff --git a/chrome/browser/cookies_tree_model.h b/chrome/browser/cookies_tree_model.h index 056fe5f..50f2e4a 100644 --- a/chrome/browser/cookies_tree_model.h +++ b/chrome/browser/cookies_tree_model.h @@ -57,7 +57,7 @@ class CookieTreeNode : public TreeNode<CookieTreeNode> { const BrowsingDataDatabaseHelper::DatabaseInfo* database_info, const BrowsingDataLocalStorageHelper::LocalStorageInfo* local_storage_info, - const BrowsingDataAppCacheHelper::AppCacheInfo* appcache_info) + const appcache::AppCacheInfo* appcache_info) : origin(origin), node_type(node_type), cookie(cookie), @@ -74,7 +74,7 @@ class CookieTreeNode : public TreeNode<CookieTreeNode> { const net::CookieMonster::CookieListPair* cookie; const BrowsingDataDatabaseHelper::DatabaseInfo* database_info; const BrowsingDataLocalStorageHelper::LocalStorageInfo* local_storage_info; - const BrowsingDataAppCacheHelper::AppCacheInfo* appcache_info; + const appcache::AppCacheInfo* appcache_info; }; CookieTreeNode() {} @@ -217,7 +217,7 @@ class CookieTreeAppCacheNode : public CookieTreeNode { // Does not take ownership of appcache_info, and appcache_info should remain // valid at least as long as the CookieTreeAppCacheNode is valid. explicit CookieTreeAppCacheNode( - const BrowsingDataAppCacheHelper::AppCacheInfo* appcache_info); + const appcache::AppCacheInfo* appcache_info); virtual ~CookieTreeAppCacheNode() {} virtual void DeleteStoredObjects(); @@ -228,7 +228,7 @@ class CookieTreeAppCacheNode : public CookieTreeNode { } private: - const BrowsingDataAppCacheHelper::AppCacheInfo* appcache_info_; + const appcache::AppCacheInfo* appcache_info_; DISALLOW_COPY_AND_ASSIGN(CookieTreeAppCacheNode); }; @@ -398,8 +398,6 @@ class CookiesTreeModel : public TreeNodeModel<CookieTreeNode> { }; typedef net::CookieMonster::CookieList CookieList; typedef std::vector<net::CookieMonster::CookieListPair*> CookiePtrList; - typedef std::vector<BrowsingDataAppCacheHelper::AppCacheInfo> - AppCacheInfoList; typedef std::vector<BrowsingDataDatabaseHelper::DatabaseInfo> DatabaseInfoList; typedef std::vector<BrowsingDataLocalStorageHelper::LocalStorageInfo> @@ -427,6 +425,7 @@ class CookiesTreeModel : public TreeNodeModel<CookieTreeNode> { scoped_refptr<BrowsingDataAppCacheHelper> appcache_helper_; scoped_refptr<BrowsingDataDatabaseHelper> database_helper_; + scoped_refptr<appcache::AppCacheInfoCollection> appcache_info_; DatabaseInfoList database_info_list_; scoped_refptr<BrowsingDataLocalStorageHelper> local_storage_helper_; diff --git a/chrome/browser/gtk/gtk_chrome_cookie_view.cc b/chrome/browser/gtk/gtk_chrome_cookie_view.cc index b6a6728..9c03994 100644 --- a/chrome/browser/gtk/gtk_chrome_cookie_view.cc +++ b/chrome/browser/gtk/gtk_chrome_cookie_view.cc @@ -432,7 +432,7 @@ void gtk_chrome_cookie_view_display_local_storage( // Switches the display to showing the passed in app cache. void gtk_chrome_cookie_view_display_app_cache( GtkChromeCookieView* self, - const BrowsingDataAppCacheHelper::AppCacheInfo& info) { + const appcache::AppCacheInfo& info) { UpdateVisibleDetailedInfo(self, self->appcache_details_table_); gtk_entry_set_text(GTK_ENTRY(self->appcache_manifest_entry_), diff --git a/chrome/browser/gtk/gtk_chrome_cookie_view.h b/chrome/browser/gtk/gtk_chrome_cookie_view.h index 2716eeb..ce157bf 100644 --- a/chrome/browser/gtk/gtk_chrome_cookie_view.h +++ b/chrome/browser/gtk/gtk_chrome_cookie_view.h @@ -141,7 +141,7 @@ void gtk_chrome_cookie_view_display_local_storage( // Switches the display to showing the passed in app cache. void gtk_chrome_cookie_view_display_app_cache( GtkChromeCookieView* widget, - const BrowsingDataAppCacheHelper::AppCacheInfo& info); + const appcache::AppCacheInfo& info); // Switches the display to an individual storage item. void gtk_chrome_cookie_view_display_local_storage_item( diff --git a/chrome/browser/mock_browsing_data_appcache_helper.cc b/chrome/browser/mock_browsing_data_appcache_helper.cc index 1dccff4..e056004 100644 --- a/chrome/browser/mock_browsing_data_appcache_helper.cc +++ b/chrome/browser/mock_browsing_data_appcache_helper.cc @@ -24,6 +24,7 @@ void MockBrowsingDataAppCacheHelper::CancelNotification() { completion_callback_.reset(NULL); } -void MockBrowsingDataAppCacheHelper::DeleteAppCache(int64 group_id) { +void MockBrowsingDataAppCacheHelper::DeleteAppCacheGroup( + const GURL& manifest_url) { } diff --git a/chrome/browser/mock_browsing_data_appcache_helper.h b/chrome/browser/mock_browsing_data_appcache_helper.h index 6dc6607..e5b3630 100644 --- a/chrome/browser/mock_browsing_data_appcache_helper.h +++ b/chrome/browser/mock_browsing_data_appcache_helper.h @@ -17,7 +17,7 @@ class MockBrowsingDataAppCacheHelper virtual void StartFetching(Callback0::Type* completion_callback); virtual void CancelNotification(); - virtual void DeleteAppCache(int64 group_id); + virtual void DeleteAppCacheGroup(const GURL& manifest_url); private: virtual ~MockBrowsingDataAppCacheHelper(); diff --git a/chrome/browser/views/appcache_info_view.cc b/chrome/browser/views/appcache_info_view.cc index fd23e7f..4de638c 100755 --- a/chrome/browser/views/appcache_info_view.cc +++ b/chrome/browser/views/appcache_info_view.cc @@ -29,8 +29,7 @@ AppCacheInfoView::AppCacheInfoView() AppCacheInfoView::~AppCacheInfoView() { } -void AppCacheInfoView::SetAppCacheInfo( - const BrowsingDataAppCacheHelper::AppCacheInfo* info) { +void AppCacheInfoView::SetAppCacheInfo(const appcache::AppCacheInfo* info) { DCHECK(info); manifest_url_field_->SetText(UTF8ToWide(info->manifest_url.spec())); size_field_->SetText( diff --git a/chrome/browser/views/appcache_info_view.h b/chrome/browser/views/appcache_info_view.h index ad209d0..25db5dd 100755 --- a/chrome/browser/views/appcache_info_view.h +++ b/chrome/browser/views/appcache_info_view.h @@ -26,7 +26,7 @@ class AppCacheInfoView : public views::View { AppCacheInfoView(); virtual ~AppCacheInfoView(); - void SetAppCacheInfo(const BrowsingDataAppCacheHelper::AppCacheInfo* info); + void SetAppCacheInfo(const appcache::AppCacheInfo* info); void ClearAppCacheDisplay(); void EnableAppCacheDisplay(bool enabled); |