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

Unified Diff: chrome/browser/services/gcm/fake_signin_manager.cc

Issue 2121163003: Remove chrome/browser/services/fake_signin_manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/services/gcm/fake_signin_manager.h ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/services/gcm/fake_signin_manager.cc
diff --git a/chrome/browser/services/gcm/fake_signin_manager.cc b/chrome/browser/services/gcm/fake_signin_manager.cc
deleted file mode 100644
index aa72139a8afaaa3d6e9a43386fbd172221fe9463..0000000000000000000000000000000000000000
--- a/chrome/browser/services/gcm/fake_signin_manager.cc
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/services/gcm/fake_signin_manager.h"
-
-#include "base/observer_list.h"
-#include "build/build_config.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/signin/account_tracker_service_factory.h"
-#include "chrome/browser/signin/chrome_signin_client_factory.h"
-#include "chrome/browser/signin/gaia_cookie_manager_service_factory.h"
-#include "components/keyed_service/core/keyed_service.h"
-#include "components/prefs/pref_service.h"
-#include "components/signin/core/browser/account_tracker_service.h"
-#include "components/signin/core/common/signin_pref_names.h"
-#include "content/public/browser/browser_context.h"
-
-#if !defined(OS_CHROMEOS)
-#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
-#endif
-
-namespace gcm {
-
-FakeSigninManager::FakeSigninManager(Profile* profile)
-#if defined(OS_CHROMEOS)
- : SigninManagerBase(
- ChromeSigninClientFactory::GetInstance()->GetForProfile(profile),
- AccountTrackerServiceFactory::GetForProfile(profile)),
-#else
- : SigninManager(
- ChromeSigninClientFactory::GetInstance()->GetForProfile(profile),
- ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
- AccountTrackerServiceFactory::GetForProfile(profile),
- GaiaCookieManagerServiceFactory::GetForProfile(profile)),
-#endif
- profile_(profile) {
- Initialize(NULL);
-}
-
-FakeSigninManager::~FakeSigninManager() {
-}
-
-void FakeSigninManager::SignIn(const std::string& account_id) {
- SetAuthenticatedAccountId(account_id);
- FOR_EACH_OBSERVER(SigninManagerBase::Observer,
- observer_list_,
- GoogleSigninSucceeded(account_id, account_id,
- std::string()));
-}
-
-void FakeSigninManager::SignOut(
- signin_metrics::ProfileSignout signout_source_metric,
- signin_metrics::SignoutDelete signout_delete_metric) {
- const std::string account_id = GetAuthenticatedAccountId();
- const std::string username = GetAuthenticatedAccountInfo().email;
- clear_authenticated_user();
- profile_->GetPrefs()->ClearPref(prefs::kGoogleServicesAccountId);
- FOR_EACH_OBSERVER(SigninManagerBase::Observer,
- observer_list_,
- GoogleSignedOut(account_id, username));
-}
-
-// static
-KeyedService* FakeSigninManager::Build(content::BrowserContext* context) {
- return new FakeSigninManager(Profile::FromBrowserContext(context));
-}
-
-} // namespace gcm
« no previous file with comments | « chrome/browser/services/gcm/fake_signin_manager.h ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698