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

Unified Diff: chrome/browser/policy/url_blacklist_manager.cc

Issue 12502017: signin: pull basic SigninManager functionality into new SigninManagerBase class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: deal with new enterprise_platform_keys_private_api Created 7 years, 8 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/policy/url_blacklist_manager.cc
diff --git a/chrome/browser/policy/url_blacklist_manager.cc b/chrome/browser/policy/url_blacklist_manager.cc
index c99a89ea8fc017a3c6e2d772ef10d9fac5026aca..e757b5dbc2ad2369890b4a240eb6e20324f95f03 100644
--- a/chrome/browser/policy/url_blacklist_manager.cc
+++ b/chrome/browser/policy/url_blacklist_manager.cc
@@ -11,7 +11,6 @@
#include "base/strings/string_number_conversions.h"
#include "base/values.h"
#include "chrome/browser/net/url_fixer_upper.h"
-#include "chrome/browser/signin/signin_manager.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "components/user_prefs/pref_registry_syncable.h"
@@ -23,6 +22,10 @@
#include "net/base/load_flags.h"
#include "net/url_request/url_request.h"
+#if !defined(OS_CHROMEOS)
+#include "chrome/browser/signin/signin_manager.h"
+#endif
+
using content::BrowserThread;
using extensions::URLMatcher;
using extensions::URLMatcherCondition;
@@ -58,6 +61,8 @@ bool IsStandardScheme(const std::string& scheme) {
return false;
}
+#if !defined(OS_CHROMEOS)
+
bool IsSigninFlowURL(const GURL& url) {
// Whitelist all the signin flow URLs flagged by the SigninManager.
if (SigninManager::IsWebBasedSigninFlowURL(url))
@@ -69,6 +74,8 @@ bool IsSigninFlowURL(const GURL& url) {
return url.path() == kServiceLoginAuth;
}
+#endif // !defined(OS_CHROMEOS)
+
// A task that builds the blacklist on the FILE thread.
scoped_ptr<URLBlacklist> BuildBlacklist(scoped_ptr<base::ListValue> block,
scoped_ptr<base::ListValue> allow) {
@@ -382,8 +389,12 @@ bool URLBlacklistManager::IsRequestBlocked(
int filter_flags = net::LOAD_MAIN_FRAME | net::LOAD_SUB_FRAME;
if ((request.load_flags() & filter_flags) == 0)
return false;
+
+#if !defined(OS_CHROMEOS)
if (IsSigninFlowURL(request.url()))
return false;
+#endif
+
return IsURLBlocked(request.url());
}

Powered by Google App Engine
This is Rietveld 408576698