| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_COMMON_NET_GAIA_GAIA_URLS_H_ | 5 #ifndef CHROME_COMMON_NET_GAIA_GAIA_URLS_H_ |
| 6 #define CHROME_COMMON_NET_GAIA_GAIA_URLS_H_ | 6 #define CHROME_COMMON_NET_GAIA_GAIA_URLS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/memory/singleton.h" | 11 #include "base/memory/singleton.h" |
| 12 | 12 |
| 13 // A signleton that provides all the URLs that are used for connecting to GAIA. | 13 // A signleton that provides all the URLs that are used for connecting to GAIA. |
| 14 class GaiaUrls { | 14 class GaiaUrls { |
| 15 public: | 15 public: |
| 16 static GaiaUrls* GetInstance(); | 16 static GaiaUrls* GetInstance(); |
| 17 | 17 |
| 18 // The URLs for different calls in the Google Accounts programmatic login API. | 18 // The URLs for different calls in the Google Accounts programmatic login API. |
| 19 const std::string& captcha_url_prefix(); | 19 const std::string& captcha_url_prefix(); |
| 20 const std::string& client_login_url(); | 20 const std::string& client_login_url(); |
| 21 const std::string& issue_auth_token_url(); | 21 const std::string& issue_auth_token_url(); |
| 22 const std::string& get_user_info_url(); | 22 const std::string& get_user_info_url(); |
| 23 const std::string& token_auth_url(); | 23 const std::string& token_auth_url(); |
| 24 const std::string& merge_session_url(); |
| 24 | 25 |
| 25 private: | 26 private: |
| 26 GaiaUrls(); | 27 GaiaUrls(); |
| 27 ~GaiaUrls(); | 28 ~GaiaUrls(); |
| 28 | 29 |
| 29 friend struct DefaultSingletonTraits<GaiaUrls>; | 30 friend struct DefaultSingletonTraits<GaiaUrls>; |
| 30 | 31 |
| 31 std::string host_base_; | 32 std::string host_base_; |
| 32 std::string captcha_url_prefix_; | 33 std::string captcha_url_prefix_; |
| 33 std::string client_login_url_; | 34 std::string client_login_url_; |
| 34 std::string issue_auth_token_url_; | 35 std::string issue_auth_token_url_; |
| 35 std::string get_user_info_url_; | 36 std::string get_user_info_url_; |
| 36 std::string token_auth_url_; | 37 std::string token_auth_url_; |
| 38 std::string merge_session_url_; |
| 37 | 39 |
| 38 DISALLOW_COPY_AND_ASSIGN(GaiaUrls); | 40 DISALLOW_COPY_AND_ASSIGN(GaiaUrls); |
| 39 }; | 41 }; |
| 40 | 42 |
| 41 #endif // CHROME_COMMON_NET_GAIA_GAIA_URLS_H_ | 43 #endif // CHROME_COMMON_NET_GAIA_GAIA_URLS_H_ |
| OLD | NEW |