summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui
diff options
context:
space:
mode:
authortimsteele@google.com <timsteele@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-15 18:46:34 +0000
committertimsteele@google.com <timsteele@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-15 18:46:34 +0000
commit3a453fa1f16dfa4168e52790e329148366abb05f (patch)
treea8bbab89ec883a838600e0b63d92fad4361e5dfb /chrome/browser/dom_ui
parent173de1be12780200c62bae5c01965d51ac0eaa31 (diff)
downloadchromium_src-3a453fa1f16dfa4168e52790e329148366abb05f.zip
chromium_src-3a453fa1f16dfa4168e52790e329148366abb05f.tar.gz
chromium_src-3a453fa1f16dfa4168e52790e329148366abb05f.tar.bz2
Copy from http://chrome-reviews.prom.corp.google.com/1237 (new gcl changelist model).
Description was: Conditionally include personalization/ code by surrounding the hooks into this module with #ifdef CHROME_PERSONALIZATION in various .h/.cc files. Building with the module requires adding this macro as a preprocessor definition in build/internal/essential.vsprops, and adding it to the VCResourceCompiler tool's command line (using /d). We will try and make this easier in the future. TBR=darin git-svn-id: svn://svn.chromium.org/chrome/trunk/src@955 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r--chrome/browser/dom_ui/chrome_url_data_manager.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/chrome/browser/dom_ui/chrome_url_data_manager.cc b/chrome/browser/dom_ui/chrome_url_data_manager.cc
index b35e049..9da9319 100644
--- a/chrome/browser/dom_ui/chrome_url_data_manager.cc
+++ b/chrome/browser/dom_ui/chrome_url_data_manager.cc
@@ -41,6 +41,12 @@
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_file_job.h"
#include "net/url_request/url_request_job.h"
+#ifdef CHROME_PERSONALIZATION
+// TODO(timsteele): Remove all CHROME_PERSONALIZATION code in this file.
+// It is only temporarily needed to configure some personalization data sources
+// that will go away soon.
+#include "chrome/personalization/personalization.h"
+#endif
// The URL scheme used for internal chrome resources.
// This URL scheme is never needed by code external to this module.
@@ -114,13 +120,24 @@ void RegisterURLRequestChromeJob() {
URLRequest::RegisterProtocolFactory(kChromeURLScheme,
&ChromeURLDataManager::Factory);
+#ifdef CHROME_PERSONALIZATION
+ url_util::AddStandardScheme(kPersonalizationScheme);
+ URLRequest::RegisterProtocolFactory(kPersonalizationScheme,
+ &ChromeURLDataManager::Factory);
+#endif
}
// static
void ChromeURLDataManager::URLToRequest(const GURL& url,
std::string* source_name,
std::string* path) {
+#ifdef CHROME_PERSONALIZATION
+ DCHECK(url.SchemeIs(kChromeURLScheme) ||
+ url.SchemeIs(kPersonalizationScheme));
+#else
DCHECK(url.SchemeIs(kChromeURLScheme));
+#endif
+
if (!url.is_valid()) {
NOTREACHED();
return;