Index: chrome/browser/browser_about_handler.cc |
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc |
index 715f46070b1d1528ac4ea74c203f53d9002334fe..f5c9de84ca04242c14854fff0cc5807fe2cdf0e5 100644 |
--- a/chrome/browser/browser_about_handler.cc |
+++ b/chrome/browser/browser_about_handler.cc |
@@ -1078,14 +1078,8 @@ bool WillHandleBrowserAboutURL(GURL* url, Profile* profile) { |
if (chrome_about_handler::WillHandle(*url)) |
return false; |
- // Anything else requires our special handler, make sure its initialized. |
- // We only need to register the AboutSource once and it is kept globally. |
- // There is currently no way to remove a data source. |
- static bool initialized = false; |
- if (!initialized) { |
- about_source = new AboutSource(); |
- initialized = true; |
- } |
+ // Anything else requires our special handler; make sure it's initialized. |
+ InitializeAboutDataSource(); |
// Special case about:memory to go through a redirect before ending up on |
// the final page. See GetAboutMemoryRedirectResponse above for why. |
@@ -1103,6 +1097,16 @@ bool WillHandleBrowserAboutURL(GURL* url, Profile* profile) { |
return true; |
} |
+void InitializeAboutDataSource() { |
+ // We only need to register the AboutSource once and it is kept globally. |
+ // There is currently no way to remove a data source. |
+ static bool initialized = false; |
+ if (!initialized) { |
+ about_source = new AboutSource(); |
+ initialized = true; |
+ } |
+} |
+ |
// This function gets called with the fixed-up chrome: URLs, so we have to |
// compare against those instead of "about:blah". |
bool HandleNonNavigationAboutURL(const GURL& url) { |