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

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

Issue 6546078: Makes a handful of DataSources not replace the existing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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
Index: chrome/browser/webui/chrome_url_data_manager.cc
diff --git a/chrome/browser/webui/chrome_url_data_manager.cc b/chrome/browser/webui/chrome_url_data_manager.cc
index c5607833ca65ff05bb213dc8958384a5d3a3d950..d7abed2b2a25b46e6f506217fd1b45fc46c95927 100644
--- a/chrome/browser/webui/chrome_url_data_manager.cc
+++ b/chrome/browser/webui/chrome_url_data_manager.cc
@@ -48,7 +48,6 @@ ChromeURLDataManager::~ChromeURLDataManager() {
void ChromeURLDataManager::AddDataSource(DataSource* source) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- registered_source_names_.insert(source->source_name());
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
NewRunnableFunction(AddDataSourceOnIOThread,
@@ -56,10 +55,6 @@ void ChromeURLDataManager::AddDataSource(DataSource* source) {
make_scoped_refptr(source)));
}
-bool ChromeURLDataManager::IsRegistered(const std::string& name) {
- return registered_source_names_.find(name) != registered_source_names_.end();
-}
-
// static
void ChromeURLDataManager::DeleteDataSources() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -149,6 +144,10 @@ MessageLoop* ChromeURLDataManager::DataSource::MessageLoopForRequestPath(
return message_loop_;
}
+bool ChromeURLDataManager::DataSource::ShouldReplaceExistingSource() const {
+ return true;
+}
+
// static
void ChromeURLDataManager::DataSource::SetFontAndTextDirection(
DictionaryValue* localized_strings) {

Powered by Google App Engine
This is Rietveld 408576698