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

Unified Diff: chrome/browser/signin/signin_manager.cc

Issue 216703002: Move the SigninProcess APIs from SigninManager to ChromeSigninClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove cruft Created 6 years, 9 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/signin/signin_manager.h ('k') | chrome/browser/ui/sync/one_click_signin_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/signin_manager.cc
diff --git a/chrome/browser/signin/signin_manager.cc b/chrome/browser/signin/signin_manager.cc
index 2f51e85d799e1709bfaa76adecbaf634472e7944..7af881b9066bde2cf013484238d4b82c43000c4e 100644
--- a/chrome/browser/signin/signin_manager.cc
+++ b/chrome/browser/signin/signin_manager.cc
@@ -23,8 +23,6 @@
#include "components/signin/core/browser/signin_internals_util.h"
#include "components/signin/core/browser/signin_manager_cookie_helper.h"
#include "content/public/browser/notification_service.h"
-#include "content/public/browser/render_process_host.h"
-#include "content/public/common/child_process_host.h"
#include "google_apis/gaia/gaia_auth_util.h"
#include "google_apis/gaia/gaia_urls.h"
#include "net/base/escape.h"
@@ -32,9 +30,6 @@
using namespace signin_internals_util;
-using content::ChildProcessHost;
-using content::RenderProcessHost;
-
namespace {
const char kChromiumSyncService[] = "service=chromiumsync";
@@ -72,34 +67,8 @@ SigninManager::SigninManager(SigninClient* client)
prohibit_signout_(false),
type_(SIGNIN_TYPE_NONE),
weak_pointer_factory_(this),
- signin_host_id_(ChildProcessHost::kInvalidUniqueID),
client_(client) {}
-void SigninManager::SetSigninProcess(int process_id) {
- if (process_id == signin_host_id_)
- return;
- DLOG_IF(WARNING,
- signin_host_id_ != ChildProcessHost::kInvalidUniqueID)
- << "Replacing in-use signin process.";
- signin_host_id_ = process_id;
- RenderProcessHost* host = RenderProcessHost::FromID(process_id);
- DCHECK(host);
- host->AddObserver(this);
- signin_hosts_observed_.insert(host);
-}
-
-void SigninManager::ClearSigninProcess() {
- signin_host_id_ = ChildProcessHost::kInvalidUniqueID;
-}
-
-bool SigninManager::IsSigninProcess(int process_id) const {
- return process_id == signin_host_id_;
-}
-
-bool SigninManager::HasSigninProcess() const {
- return signin_host_id_ != ChildProcessHost::kInvalidUniqueID;
-}
-
void SigninManager::AddMergeSessionObserver(
MergeSessionHelper::Observer* observer) {
if (merge_session_helper_)
@@ -113,12 +82,6 @@ void SigninManager::RemoveMergeSessionObserver(
}
SigninManager::~SigninManager() {
- std::set<RenderProcessHost*>::iterator i;
- for (i = signin_hosts_observed_.begin();
- i != signin_hosts_observed_.end();
- ++i) {
- (*i)->RemoveObserver(this);
- }
}
void SigninManager::InitTokenService() {
@@ -445,16 +408,6 @@ void SigninManager::OnSignedIn(const std::string& username) {
DisableOneClickSignIn(profile_); // Don't ever offer again.
}
-void SigninManager::RenderProcessHostDestroyed(RenderProcessHost* host) {
- // It's possible we're listening to a "stale" renderer because it was replaced
- // with a new process by process-per-site. In either case, stop observing it,
- // but only reset signin_host_id_ tracking if this was from the current signin
- // process.
- signin_hosts_observed_.erase(host);
- if (signin_host_id_ == host->GetID())
- signin_host_id_ = ChildProcessHost::kInvalidUniqueID;
-}
-
void SigninManager::ProhibitSignout(bool prohibit_signout) {
prohibit_signout_ = prohibit_signout;
}
« no previous file with comments | « chrome/browser/signin/signin_manager.h ('k') | chrome/browser/ui/sync/one_click_signin_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698