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

Side by Side Diff: content/browser/in_process_webkit/indexed_db_context_impl.h

Issue 9836066: Have content cancel requests for ResourceContexts when they shutdown, instead of depending on the e… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_CONTEXT_IMPL_H_ 5 #ifndef CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_CONTEXT_IMPL_H_
6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_CONTEXT_IMPL_H_ 6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_CONTEXT_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 quota::QuotaManagerProxy* quota_manager_proxy(); 79 quota::QuotaManagerProxy* quota_manager_proxy();
80 80
81 FilePath data_path() const { return data_path_; } 81 FilePath data_path() const { return data_path_; }
82 82
83 // For unit tests allow to override the |data_path_|. 83 // For unit tests allow to override the |data_path_|.
84 void set_data_path_for_testing(const FilePath& data_path) { 84 void set_data_path_for_testing(const FilePath& data_path) {
85 data_path_ = data_path; 85 data_path_ = data_path;
86 } 86 }
87 87
88 private: 88 private:
89 FRIEND_TEST_ALL_PREFIXES(IndexedDBBrowserTest, ClearLocalState); 89 FRIEND_TEST_ALL_PREFIXES(IndexedDBTest, ClearLocalState);
90 FRIEND_TEST_ALL_PREFIXES(IndexedDBBrowserTest, ClearSessionOnlyDatabases); 90 FRIEND_TEST_ALL_PREFIXES(IndexedDBTest, ClearSessionOnlyDatabases);
91 FRIEND_TEST_ALL_PREFIXES(IndexedDBBrowserTest, SaveSessionState); 91 FRIEND_TEST_ALL_PREFIXES(IndexedDBTest, SaveSessionState);
92 friend class IndexedDBQuotaClientTest; 92 friend class IndexedDBQuotaClientTest;
93 93
94 typedef std::map<GURL, int64> OriginToSizeMap; 94 typedef std::map<GURL, int64> OriginToSizeMap;
95 class IndexedDBGetUsageAndQuotaCallback; 95 class IndexedDBGetUsageAndQuotaCallback;
96 96
97 FilePath GetIndexedDBFilePath(const string16& origin_id) const; 97 FilePath GetIndexedDBFilePath(const string16& origin_id) const;
98 int64 ReadUsageFromDisk(const GURL& origin_url) const; 98 int64 ReadUsageFromDisk(const GURL& origin_url) const;
99 void EnsureDiskUsageCacheInitialized(const GURL& origin_url); 99 void EnsureDiskUsageCacheInitialized(const GURL& origin_url);
100 void QueryDiskAndUpdateQuotaUsage(const GURL& origin_url); 100 void QueryDiskAndUpdateQuotaUsage(const GURL& origin_url);
101 void GotUsageAndQuota(const GURL& origin_url, quota::QuotaStatusCode, 101 void GotUsageAndQuota(const GURL& origin_url, quota::QuotaStatusCode,
(...skipping 25 matching lines...) Expand all
127 scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_; 127 scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_;
128 scoped_ptr<std::set<GURL> > origin_set_; 128 scoped_ptr<std::set<GURL> > origin_set_;
129 OriginToSizeMap origin_size_map_; 129 OriginToSizeMap origin_size_map_;
130 OriginToSizeMap space_available_map_; 130 OriginToSizeMap space_available_map_;
131 std::map<GURL, unsigned int> connection_count_; 131 std::map<GURL, unsigned int> connection_count_;
132 132
133 DISALLOW_COPY_AND_ASSIGN(IndexedDBContextImpl); 133 DISALLOW_COPY_AND_ASSIGN(IndexedDBContextImpl);
134 }; 134 };
135 135
136 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_CONTEXT_IMPL_H_ 136 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_CONTEXT_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/in_process_webkit/indexed_db_browsertest.cc ('k') | content/browser/in_process_webkit/indexed_db_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698