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

Unified Diff: content/browser/appcache/appcache_host.h

Issue 1418783005: Fix possible map::end() dereference in AppCacheUpdateJob triggered by a compromised renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move check to host, add unittest Created 5 years, 1 month 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 | « content/browser/appcache/appcache_backend_impl.cc ('k') | content/browser/appcache/appcache_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/appcache/appcache_host.h
diff --git a/content/browser/appcache/appcache_host.h b/content/browser/appcache/appcache_host.h
index 82029baf3f68eec63ee95964ed97af3217dc8feb..3818f30683ef4173cfe5ffadbc567f6c1afe15fa 100644
--- a/content/browser/appcache/appcache_host.h
+++ b/content/browser/appcache/appcache_host.h
@@ -33,6 +33,7 @@ FORWARD_DECLARE_TEST(AppCacheHostTest, SetSwappableCache);
FORWARD_DECLARE_TEST(AppCacheHostTest, ForDedicatedWorker);
FORWARD_DECLARE_TEST(AppCacheHostTest, SelectCacheAllowed);
FORWARD_DECLARE_TEST(AppCacheHostTest, SelectCacheBlocked);
+FORWARD_DECLARE_TEST(AppCacheHostTest, SelectCacheTwice);
FORWARD_DECLARE_TEST(AppCacheTest, CleanupUnusedCache);
class AppCache;
class AppCacheFrontend;
@@ -76,13 +77,13 @@ class CONTENT_EXPORT AppCacheHost
void RemoveObserver(Observer* observer);
// Support for cache selection and scriptable method calls.
- void SelectCache(const GURL& document_url,
+ bool SelectCache(const GURL& document_url,
const int64 cache_document_was_loaded_from,
const GURL& manifest_url);
- void SelectCacheForWorker(int parent_process_id,
+ bool SelectCacheForWorker(int parent_process_id,
int parent_host_id);
- void SelectCacheForSharedWorker(int64 appcache_id);
- void MarkAsForeignEntry(const GURL& document_url,
+ bool SelectCacheForSharedWorker(int64 appcache_id);
+ bool MarkAsForeignEntry(const GURL& document_url,
int64 cache_document_was_loaded_from);
void GetStatusWithCallback(const GetStatusCallback& callback,
void* callback_param);
@@ -163,7 +164,6 @@ class CONTENT_EXPORT AppCacheHost
AppCacheStorage* storage() const { return storage_; }
AppCacheFrontend* frontend() const { return frontend_; }
AppCache* associated_cache() const { return associated_cache_.get(); }
- bool was_select_cache_called() const { return was_select_cache_called_; }
void enable_cache_selection(bool enable) {
is_cache_selection_enabled_ = enable;
@@ -336,6 +336,7 @@ class CONTENT_EXPORT AppCacheHost
FRIEND_TEST_ALL_PREFIXES(content::AppCacheHostTest, ForDedicatedWorker);
FRIEND_TEST_ALL_PREFIXES(content::AppCacheHostTest, SelectCacheAllowed);
FRIEND_TEST_ALL_PREFIXES(content::AppCacheHostTest, SelectCacheBlocked);
+ FRIEND_TEST_ALL_PREFIXES(content::AppCacheHostTest, SelectCacheTwice);
FRIEND_TEST_ALL_PREFIXES(content::AppCacheTest, CleanupUnusedCache);
DISALLOW_COPY_AND_ASSIGN(AppCacheHost);
« no previous file with comments | « content/browser/appcache/appcache_backend_impl.cc ('k') | content/browser/appcache/appcache_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698