| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/policy/policy_helpers.h" | 5 #include "chrome/browser/policy/policy_helpers.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "net/base/net_errors.h" | 8 #include "net/base/net_errors.h" |
| 9 #include "url/gurl.h" | 9 #include "url/gurl.h" |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 *block = true; | 42 *block = true; |
| 43 return true; | 43 return true; |
| 44 #else | 44 #else |
| 45 static const char kServiceLoginAuth[] = "/ServiceLoginAuth"; | 45 static const char kServiceLoginAuth[] = "/ServiceLoginAuth"; |
| 46 | 46 |
| 47 *block = false; | 47 *block = false; |
| 48 // Additionally whitelist /ServiceLoginAuth. | 48 // Additionally whitelist /ServiceLoginAuth. |
| 49 if (url.GetOrigin() != GaiaUrls::GetInstance()->gaia_url().GetOrigin()) | 49 if (url.GetOrigin() != GaiaUrls::GetInstance()->gaia_url().GetOrigin()) |
| 50 return false; | 50 return false; |
| 51 | 51 |
| 52 return url.path() == kServiceLoginAuth; | 52 return url.path_piece() == kServiceLoginAuth; |
| 53 #endif | 53 #endif |
| 54 } | 54 } |
| 55 | 55 |
| 56 } // namespace policy | 56 } // namespace policy |
| OLD | NEW |