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

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

Issue 209473008: Block all web requests until force enrollment status has been confirmed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Flag based blocking. Created 6 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/policy/url_blacklist_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/policy_helpers.cc
diff --git a/chrome/browser/policy/policy_helpers.cc b/chrome/browser/policy/policy_helpers.cc
index e9b6983d65117261a446f62a4c3f4f85f3912cba..460be0f7aa02d138b1f515573fb2af1804afc718 100644
--- a/chrome/browser/policy/policy_helpers.cc
+++ b/chrome/browser/policy/policy_helpers.cc
@@ -6,6 +6,11 @@
#include "url/gurl.h"
+#if defined(OS_CHROMEOS)
+#include "base/command_line.h"
+#include "chromeos/chromeos_switches.h"
+#endif
+
#if !defined(OS_CHROMEOS) && !defined(OS_IOS)
#include "chrome/browser/signin/signin_manager.h"
#include "google_apis/gaia/gaia_urls.h"
@@ -14,7 +19,18 @@
namespace policy {
bool OverrideBlacklistForURL(const GURL& url, bool* block) {
-#if defined(OS_CHROMEOS) || defined(OS_IOS)
+#if defined(OS_CHROMEOS)
+ // On ChromeOS browsing is only allowed once OOBE has completed. Therefore all
+ // requests are blocked until this condition is met.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ chromeos::switches::kOobeGuestSession)) {
Mattias Nissler (ping if slow) 2014/03/25 14:20:45 Is this indentation legit? My gut feeling is +4
+ if (url.SchemeIs("http") || url.SchemeIs("https") || url.SchemeIs("ftp")) {
Mattias Nissler (ping if slow) 2014/03/25 14:20:45 So you're still blacklisting stuff? Didn't we deci
+ *block = true;
+ return true;
+ }
+ }
+ return false;
+#elif defined(OS_IOS)
return false;
#else
static const char kServiceLoginAuth[] = "/ServiceLoginAuth";
« no previous file with comments | « no previous file | chrome/browser/policy/url_blacklist_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698