OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "google_apis/gaia/gaia_auth_util.h" | 5 #include "google_apis/gaia/gaia_auth_util.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/string_split.h" | 10 #include "base/string_split.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 return email.substr(separator_pos + 1); | 57 return email.substr(separator_pos + 1); |
58 else | 58 else |
59 NOTREACHED() << "Not a proper email address: " << email; | 59 NOTREACHED() << "Not a proper email address: " << email; |
60 return std::string(); | 60 return std::string(); |
61 } | 61 } |
62 | 62 |
63 bool IsGaiaSignonRealm(const GURL& url) { | 63 bool IsGaiaSignonRealm(const GURL& url) { |
64 if (!url.SchemeIsSecure()) | 64 if (!url.SchemeIsSecure()) |
65 return false; | 65 return false; |
66 | 66 |
67 // Also check "https://www.google.com" to support old style dasher logins. | 67 return url == GURL(GaiaUrls::GetInstance()->gaia_origin_url()); |
68 return url == GURL(GaiaUrls::GetInstance()->gaia_origin_url()) || | |
69 url == GURL("https://www.google.com/"); | |
70 } | 68 } |
71 | 69 |
72 } // namespace gaia | 70 } // namespace gaia |
OLD | NEW |