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 #ifndef GOOGLE_APIS_GOOGLE_API_KEYS_H_ | 5 #ifndef GOOGLE_APIS_GOOGLE_API_KEYS_H_ |
6 #define GOOGLE_APIS_GOOGLE_API_KEYS_H_ | 6 #define GOOGLE_APIS_GOOGLE_API_KEYS_H_ |
7 | 7 |
8 // If you add more includes to this file, you also need to add them to | 8 // If you add more includes to this file, you also need to add them to |
9 // google_api_keys_unittest.cc. | 9 // google_api_keys_unittest.cc. |
10 #include <string> | 10 #include <string> |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
64 // | 64 // |
65 // Note that the key should be escaped for the context you use it in, | 65 // Note that the key should be escaped for the context you use it in, |
66 // e.g. URL-escaped if you use it in a URL. | 66 // e.g. URL-escaped if you use it in a URL. |
67 std::string GetAPIKey(); | 67 std::string GetAPIKey(); |
68 | 68 |
69 // Represents the different sets of client IDs and secrets in use. | 69 // Represents the different sets of client IDs and secrets in use. |
70 enum OAuth2Client { | 70 enum OAuth2Client { |
71 CLIENT_MAIN, // Several different features use this. | 71 CLIENT_MAIN, // Several different features use this. |
72 CLIENT_CLOUD_PRINT, | 72 CLIENT_CLOUD_PRINT, |
73 CLIENT_REMOTING, | 73 CLIENT_REMOTING, |
74 CLIENT_REMOTING_SERVICE_ACCOUNT, | |
Sergey Ulanov
2013/07/23 23:37:32
Maybe call it REMOTING_HOST? Long term it will be
| |
74 | 75 |
75 CLIENT_NUM_ITEMS // Must be last item. | 76 CLIENT_NUM_ITEMS // Must be last item. |
76 }; | 77 }; |
77 | 78 |
78 // Retrieves the OAuth2 client ID for the specified client, or the | 79 // Retrieves the OAuth2 client ID for the specified client, or the |
79 // empty string if not set. | 80 // empty string if not set. |
80 // | 81 // |
81 // Note that the ID should be escaped for the context you use it in, | 82 // Note that the ID should be escaped for the context you use it in, |
82 // e.g. URL-escaped if you use it in a URL. | 83 // e.g. URL-escaped if you use it in a URL. |
83 std::string GetOAuth2ClientID(OAuth2Client client); | 84 std::string GetOAuth2ClientID(OAuth2Client client); |
84 | 85 |
85 // Retrieves the OAuth2 client secret for the specified client, or the | 86 // Retrieves the OAuth2 client secret for the specified client, or the |
86 // empty string if not set. | 87 // empty string if not set. |
87 // | 88 // |
88 // Note that the secret should be escaped for the context you use it | 89 // Note that the secret should be escaped for the context you use it |
89 // in, e.g. URL-escaped if you use it in a URL. | 90 // in, e.g. URL-escaped if you use it in a URL. |
90 std::string GetOAuth2ClientSecret(OAuth2Client client); | 91 std::string GetOAuth2ClientSecret(OAuth2Client client); |
91 | 92 |
92 } // namespace google_apis | 93 } // namespace google_apis |
93 | 94 |
94 #endif // GOOGLE_APIS_GOOGLE_API_KEYS_H_ | 95 #endif // GOOGLE_APIS_GOOGLE_API_KEYS_H_ |
OLD | NEW |