Skip to content

Commit 850b353

Browse files
author
msarda@chromium.org
committed
Move OAuth2 client id and secret switches to gaia_switches.h
The OAuth2 client id and secret switches are also used on Chrome for iOS downstream so they need to be available in a public header. BUG=285944 Review URL: https://codereview.chromium.org/141653020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250419 0039d316-1c4b-4281-b951-d872f2087c98
1 parent f1a854a commit 850b353

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

google_apis/gaia/gaia_switches.cc

+2
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@ const char kLsoUrl[] = "lso-url";
1313
const char kOAuth1LoginScope[] = "oauth1-login-scope";
1414
const char kOAuthWrapBridgeUserInfoScope[] =
1515
"oauth-wrap-bridge-user-info-scope";
16+
const char kOAuth2ClientID[] = "oauth2-client-id";
17+
const char kOAuth2ClientSecret[] = "oauth2-client-secret";
1618

1719
} // namespace switches

google_apis/gaia/gaia_switches.h

+6
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ extern const char kOAuth1LoginScope[];
2828
// Overrides OAuth wrap bridge user info scope.
2929
extern const char kOAuthWrapBridgeUserInfoScope[];
3030

31+
// Specifies custom OAuth2 client id for testing purposes.
32+
extern const char kOAuth2ClientID[];
33+
34+
// Specifies custom OAuth2 client secret for testing purposes.
35+
extern const char kOAuth2ClientSecret[];
36+
3137
} // namespace switches
3238

3339
#endif // GOOGLE_APIS_GAIA_GAIA_SWITCHES_H_

google_apis/google_api_keys.cc

+1-10
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "base/logging.h"
1313
#include "base/memory/scoped_ptr.h"
1414
#include "base/strings/stringize_macros.h"
15+
#include "google_apis/gaia/gaia_switches.h"
1516

1617
#if defined(GOOGLE_CHROME_BUILD) || defined(USE_OFFICIAL_GOOGLE_API_KEYS)
1718
#include "google_apis/internal/google_chrome_api_keys.h"
@@ -69,16 +70,6 @@
6970
#define GOOGLE_DEFAULT_CLIENT_SECRET ""
7071
#endif
7172

72-
namespace switches {
73-
74-
// Specifies custom OAuth2 client id for testing purposes.
75-
const char kOAuth2ClientID[] = "oauth2-client-id";
76-
77-
// Specifies custom OAuth2 client secret for testing purposes.
78-
const char kOAuth2ClientSecret[] = "oauth2-client-secret";
79-
80-
} // namespace switches
81-
8273
namespace google_apis {
8374

8475
// This is used as a lazy instance to determine keys once and cache them.

google_apis/google_api_keys_unittest.cc

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "google_apis/google_api_keys.h"
1414

1515
#include "build/build_config.h"
16+
#include "google_apis/gaia/gaia_switches.h"
1617
#include "testing/gtest/include/gtest/gtest.h"
1718

1819
// The Win builders fail (with a linker crash) when trying to link

0 commit comments

Comments
 (0)