diff options
author | jknotten@chromium.org <jknotten@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-06 11:22:34 +0000 |
---|---|---|
committer | jknotten@chromium.org <jknotten@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-06 11:22:34 +0000 |
commit | 3e598ff18a9056350a1c46eb8c43418e310c6a8f (patch) | |
tree | 845dbe4ad343071fb6f42a63c33b78fd045d53a3 /chrome/browser | |
parent | bbccb030f144add5375dcdee25ebeefa31af1418 (diff) | |
download | chromium_src-3e598ff18a9056350a1c46eb8c43418e310c6a8f.zip chromium_src-3e598ff18a9056350a1c46eb8c43418e310c6a8f.tar.gz chromium_src-3e598ff18a9056350a1c46eb8c43418e310c6a8f.tar.bz2 |
Conditionally include Policy UI based on configuration_policy setting.
BUG=None
TEST=Builds on linux redux bot.
Review URL: http://codereview.chromium.org/7834020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99721 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/net/chrome_network_delegate.cc | 7 | ||||
-rw-r--r-- | chrome/browser/profiles/profile_io_data.cc | 3 | ||||
-rw-r--r-- | chrome/browser/ui/webui/chrome_web_ui_factory.cc | 2 |
3 files changed, 10 insertions, 2 deletions
diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc index 5532bd7..0801173 100644 --- a/chrome/browser/net/chrome_network_delegate.cc +++ b/chrome/browser/net/chrome_network_delegate.cc @@ -10,7 +10,6 @@ #include "chrome/browser/extensions/extension_info_map.h" #include "chrome/browser/extensions/extension_proxy_api.h" #include "chrome/browser/extensions/extension_webrequest_api.h" -#include "chrome/browser/policy/url_blacklist_manager.h" #include "chrome/browser/prefs/pref_member.h" #include "chrome/browser/task_manager/task_manager.h" #include "chrome/common/pref_names.h" @@ -22,6 +21,10 @@ #include "net/http/http_response_headers.h" #include "net/url_request/url_request.h" +#if defined(ENABLE_CONFIGURATION_POLICY) +#include "chrome/browser/policy/url_blacklist_manager.h" +#endif + namespace { // If the |request| failed due to problems with a proxy, forward the error to @@ -72,6 +75,7 @@ int ChromeNetworkDelegate::OnBeforeURLRequest( net::URLRequest* request, net::CompletionCallback* callback, GURL* new_url) { +#if defined(ENABLE_CONFIGURATION_POLICY) // TODO(joaodasilva): This prevents extensions from seeing URLs that are // blocked. However, an extension might redirect the request to another URL, // which is not blocked. @@ -84,6 +88,7 @@ int ChromeNetworkDelegate::OnBeforeURLRequest( net::NetLog::TYPE_CHROME_POLICY_ABORTED_REQUEST, params); return net::ERR_NETWORK_ACCESS_DENIED; } +#endif if (!enable_referrers_->GetValue()) request->set_referrer(std::string()); diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc index d757ba2..6877e06 100644 --- a/chrome/browser/profiles/profile_io_data.cc +++ b/chrome/browser/profiles/profile_io_data.cc @@ -517,8 +517,9 @@ void ProfileIOData::ShutdownOnUIThread() { enable_referrers_.Destroy(); clear_local_state_on_exit_.Destroy(); safe_browsing_enabled_.Destroy(); - if (url_blacklist_manager_.get()) +#if defined(ENABLE_CONFIGURATION_POLICY) url_blacklist_manager_->ShutdownOnUIThread(); +#endif BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, base::Bind( diff --git a/chrome/browser/ui/webui/chrome_web_ui_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_factory.cc index 5a788a3..37fbec2 100644 --- a/chrome/browser/ui/webui/chrome_web_ui_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_factory.cc @@ -196,8 +196,10 @@ static WebUIFactoryFunction GetWebUIFactoryFunction(Profile* profile, return &NewWebUI<NetInternalsUI>; if (url.host() == chrome::kChromeUIPluginsHost) return &NewWebUI<PluginsUI>; +#if defined(ENABLE_CONFIGURATION_POLICY) if (url.host() == chrome::kChromeUIPolicyHost) return &NewWebUI<PolicyUI>; +#endif if (url.host() == chrome::kChromeUISessionsHost) return &NewWebUI<SessionsUI>; if (url.host() == chrome::kChromeUISyncInternalsHost) |