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

Side by Side Diff: google_apis/google_api_keys.cc

Issue 680103004: Fix windows builders when SPDY_PROXY_AUTH_VALUE is set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "google_apis/google_api_keys.h" 5 #include "google_apis/google_api_keys.h"
6 6
7 // If you add more includes to this list, you also need to add them to 7 // If you add more includes to this list, you also need to add them to
8 // google_api_keys_unittest.cc. 8 // google_api_keys_unittest.cc.
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 176 }
177 177
178 std::string GetClientSecret(OAuth2Client client) const { 178 std::string GetClientSecret(OAuth2Client client) const {
179 DCHECK_LT(client, CLIENT_NUM_ITEMS); 179 DCHECK_LT(client, CLIENT_NUM_ITEMS);
180 return client_secrets_[client]; 180 return client_secrets_[client];
181 } 181 }
182 182
183 std::string GetSpdyProxyAuthValue() { 183 std::string GetSpdyProxyAuthValue() {
184 #if defined(SPDY_PROXY_AUTH_VALUE) 184 #if defined(SPDY_PROXY_AUTH_VALUE)
185 return SPDY_PROXY_AUTH_VALUE; 185 return SPDY_PROXY_AUTH_VALUE;
186 #else
187 return std::string();
186 #endif 188 #endif
187 return std::string();
188 } 189 }
189 190
190 private: 191 private:
191 // Gets a value for a key. In priority order, this will be the value 192 // Gets a value for a key. In priority order, this will be the value
192 // provided via a command-line switch, the value provided via an 193 // provided via a command-line switch, the value provided via an
193 // environment variable, or finally a value baked into the build. 194 // environment variable, or finally a value baked into the build.
194 // |command_line_switch| may be NULL. 195 // |command_line_switch| may be NULL.
195 static std::string CalculateKeyValue(const char* baked_in_value, 196 static std::string CalculateKeyValue(const char* baked_in_value,
196 const char* environment_variable_name, 197 const char* environment_variable_name,
197 const char* command_line_switch, 198 const char* command_line_switch,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 274
274 bool IsGoogleChromeAPIKeyUsed() { 275 bool IsGoogleChromeAPIKeyUsed() {
275 #if defined(GOOGLE_CHROME_BUILD) || defined(USE_OFFICIAL_GOOGLE_API_KEYS) 276 #if defined(GOOGLE_CHROME_BUILD) || defined(USE_OFFICIAL_GOOGLE_API_KEYS)
276 return true; 277 return true;
277 #else 278 #else
278 return false; 279 return false;
279 #endif 280 #endif
280 } 281 }
281 282
282 } // namespace google_apis 283 } // namespace google_apis
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698