Commit 041c0d46 authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

Move CGaiaCredentialProviderFilter's UUID out-of-line.

Now that it's no longer in a .h file, move its definition from
depending on GOOGLE_CHROME_BUILD to GOOGLE_CHROME_BRANDING, which
is the same thing in BUILDFLAG form. Since the use is now in a .cc
file, the buildflag doesn't have to be a public_dep, switching
between branded and non-branded requires fewer rebuilds, and
it's easier to see which files depend on the branding define.

No intended behavior change.

Bug: 961769
Change-Id: I5abcc4cad3bd709792572d643aea173ad1a0996f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1893373
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarRoger Tawa <rogerta@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711277}
parent f150a61f
...@@ -5,12 +5,27 @@ ...@@ -5,12 +5,27 @@
#include "chrome/credential_provider/gaiacp/gaia_credential_provider_filter.h" #include "chrome/credential_provider/gaiacp/gaia_credential_provider_filter.h"
#include "base/strings/string16.h" #include "base/strings/string16.h"
#include "build/branding_buildflags.h"
#include "chrome/credential_provider/gaiacp/associated_user_validator.h" #include "chrome/credential_provider/gaiacp/associated_user_validator.h"
#include "chrome/credential_provider/gaiacp/auth_utils.h" #include "chrome/credential_provider/gaiacp/auth_utils.h"
#include "chrome/credential_provider/gaiacp/logging.h" #include "chrome/credential_provider/gaiacp/logging.h"
namespace credential_provider { namespace credential_provider {
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
const CLSID CLSID_CGaiaCredentialProviderFilter = {
0xaec62ffe,
0x6617,
0x4685,
{0xa0, 0x80, 0xb1, 0x1a, 0x84, 0x8a, 0x06, 0x07}};
#else
const CLSID CLSID_CGaiaCredentialProviderFilter = {
0xfd768777,
0x340e,
0x4426,
{0x9b, 0x07, 0x8f, 0xdf, 0x48, 0x9f, 0x1f, 0xf9}};
#endif
CGaiaCredentialProviderFilter::CGaiaCredentialProviderFilter() = default; CGaiaCredentialProviderFilter::CGaiaCredentialProviderFilter() = default;
CGaiaCredentialProviderFilter::~CGaiaCredentialProviderFilter() = default; CGaiaCredentialProviderFilter::~CGaiaCredentialProviderFilter() = default;
......
...@@ -18,16 +18,13 @@ namespace credential_provider { ...@@ -18,16 +18,13 @@ namespace credential_provider {
// providers get their SetUserArray called. Otherwise there could be // providers get their SetUserArray called. Otherwise there could be
// inconsistency in the UI where some credential providers are not shown if they // inconsistency in the UI where some credential providers are not shown if they
// are called before the user's rights have been revoked. // are called before the user's rights have been revoked.
class ATL_NO_VTABLE
#if defined(GOOGLE_CHROME_BUILD) extern const CLSID CLSID_CGaiaCredentialProviderFilter;
DECLSPEC_UUID("aec62ffe-6617-4685-a080-b11a848a0607")
#else class ATL_NO_VTABLE CGaiaCredentialProviderFilter
DECLSPEC_UUID("fd768777-340e-4426-9b07-8fdf489f1ff9")
#endif
CGaiaCredentialProviderFilter
: public CComObjectRootEx<CComMultiThreadModel>, : public CComObjectRootEx<CComMultiThreadModel>,
public CComCoClass<CGaiaCredentialProviderFilter, public CComCoClass<CGaiaCredentialProviderFilter,
&__uuidof(CGaiaCredentialProviderFilter)>, &CLSID_CGaiaCredentialProviderFilter>,
public ICredentialProviderFilter { public ICredentialProviderFilter {
public: public:
// This COM object is registered with the rgs file. The rgs file is used by // This COM object is registered with the rgs file. The rgs file is used by
...@@ -66,7 +63,7 @@ DECLSPEC_UUID("fd768777-340e-4426-9b07-8fdf489f1ff9") ...@@ -66,7 +63,7 @@ DECLSPEC_UUID("fd768777-340e-4426-9b07-8fdf489f1ff9")
#pragma clang diagnostic ignored "-Wextra-semi" #pragma clang diagnostic ignored "-Wextra-semi"
#endif #endif
OBJECT_ENTRY_AUTO(__uuidof(CGaiaCredentialProviderFilter), OBJECT_ENTRY_AUTO(CLSID_CGaiaCredentialProviderFilter,
CGaiaCredentialProviderFilter) CGaiaCredentialProviderFilter)
#if defined(__clang__) #if defined(__clang__)
......
...@@ -61,7 +61,7 @@ CGaiaCredentialProviderModule::UpdateRegistryAppId(BOOL do_register) throw() { ...@@ -61,7 +61,7 @@ CGaiaCredentialProviderModule::UpdateRegistryAppId(BOOL do_register) throw() {
base::win::String16FromGUID(CLSID_GaiaCredentialProvider); base::win::String16FromGUID(CLSID_GaiaCredentialProvider);
auto filter_guid_string = auto filter_guid_string =
base::win::String16FromGUID(__uuidof(CGaiaCredentialProviderFilter)); base::win::String16FromGUID(CLSID_CGaiaCredentialProviderFilter);
ATL::_ATL_REGMAP_ENTRY regmap[] = { ATL::_ATL_REGMAP_ENTRY regmap[] = {
{L"CP_CLASS_GUID", base::as_wcstr(provider_guid_string.c_str())}, {L"CP_CLASS_GUID", base::as_wcstr(provider_guid_string.c_str())},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment