Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: google_apis/google_api_keys.h

Issue 690423003: Supervised user SafeSites: Expose & use API key from src-internal (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // Returns true if no dummy API keys or OAuth2 tokens are set. 59 // Returns true if no dummy API keys or OAuth2 tokens are set.
60 bool HasKeysConfigured(); 60 bool HasKeysConfigured();
61 61
62 // Retrieves the API key, a.k.a. developer key, or a dummy string 62 // Retrieves the API key, a.k.a. developer key, or a dummy string
63 // if not set. 63 // if not set.
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 std::string GetSafeSitesAPIKey();
70
69 // Represents the different sets of client IDs and secrets in use. 71 // Represents the different sets of client IDs and secrets in use.
70 enum OAuth2Client { 72 enum OAuth2Client {
71 CLIENT_MAIN, // Several different features use this. 73 CLIENT_MAIN, // Several different features use this.
72 CLIENT_CLOUD_PRINT, 74 CLIENT_CLOUD_PRINT,
73 CLIENT_REMOTING, 75 CLIENT_REMOTING,
74 CLIENT_REMOTING_HOST, 76 CLIENT_REMOTING_HOST,
75 77
76 CLIENT_NUM_ITEMS // Must be last item. 78 CLIENT_NUM_ITEMS // Must be last item.
77 }; 79 };
78 80
(...skipping 14 matching lines...) Expand all
93 // Returns the auth token for the data reduction proxy. 95 // Returns the auth token for the data reduction proxy.
94 std::string GetSpdyProxyAuthValue(); 96 std::string GetSpdyProxyAuthValue();
95 97
96 // Returns if the API key using in the current build is the one for official 98 // Returns if the API key using in the current build is the one for official
97 // Google Chrome. 99 // Google Chrome.
98 bool IsGoogleChromeAPIKeyUsed(); 100 bool IsGoogleChromeAPIKeyUsed();
99 101
100 } // namespace google_apis 102 } // namespace google_apis
101 103
102 #endif // GOOGLE_APIS_GOOGLE_API_KEYS_H_ 104 #endif // GOOGLE_APIS_GOOGLE_API_KEYS_H_
OLDNEW
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_url_filter.cc ('k') | google_apis/google_api_keys.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698