OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/policy/policy_helpers.h" |
| 6 |
| 7 #include "url/gurl.h" |
| 8 |
| 9 #if !defined(OS_CHROMEOS) |
| 10 #include "chrome/browser/signin/signin_manager.h" |
| 11 #include "google_apis/gaia/gaia_urls.h" |
| 12 #endif |
| 13 |
| 14 namespace policy { |
| 15 |
| 16 bool SkipBlacklistForURL(const GURL& url) { |
| 17 #if defined(OS_CHROMEOS) |
| 18 return false; |
| 19 #else |
| 20 static const char kServiceLoginAuth[] = "/ServiceLoginAuth"; |
| 21 |
| 22 // Whitelist all the signin flow URLs flagged by the SigninManager. |
| 23 if (SigninManager::IsWebBasedSigninFlowURL(url)) |
| 24 return true; |
| 25 |
| 26 // Additionally whitelist /ServiceLoginAuth. |
| 27 if (url.GetOrigin() != GaiaUrls::GetInstance()->gaia_url().GetOrigin()) |
| 28 return false; |
| 29 |
| 30 return url.path() == kServiceLoginAuth; |
| 31 #endif |
| 32 } |
| 33 |
| 34 } // namespace policy |
OLD | NEW |