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

Unified Diff: chrome/browser/dom_ui/chrome_url_data_manager.cc

Issue 6268014: Release all DataSources before the main thread goes away. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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
« no previous file with comments | « chrome/browser/dom_ui/chrome_url_data_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/chrome_url_data_manager.cc
diff --git a/chrome/browser/dom_ui/chrome_url_data_manager.cc b/chrome/browser/dom_ui/chrome_url_data_manager.cc
index d0ca42c894b292754412e1544d8efa84566a095a..9c64f908a32edbf830c45803a9c43914e0494ce0 100644
--- a/chrome/browser/dom_ui/chrome_url_data_manager.cc
+++ b/chrome/browser/dom_ui/chrome_url_data_manager.cc
@@ -207,6 +207,15 @@ void ChromeURLDataManager::AddDataSource(scoped_refptr<DataSource> source) {
data_sources_[source->source_name()] = source;
}
+void ChromeURLDataManager::RemoveAllDataSources() {
+ for (DataSourceMap::iterator i = data_sources_.begin();
eroman 2011/01/25 23:47:35 why not simply data_sources_.clear() ?
ahendrickson 2011/01/26 04:34:38 I wanted to call Release() rather than destruct th
+ i != data_sources_.end();
+ i = data_sources_.begin()) {
+ (*i).second = NULL; // Calls Release().
+ data_sources_.erase(i);
+ }
+}
+
void ChromeURLDataManager::AddFileSource(const std::string& source_name,
const FilePath& file_path) {
DCHECK(file_sources_.count(source_name) == 0);
« no previous file with comments | « chrome/browser/dom_ui/chrome_url_data_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698