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

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

Issue 964553002: Remove support for special "sign in process" state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ocl3
Patch Set: rebased Created 5 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/chrome_signin_client.h ('k') | chrome/browser/signin/signin_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/chrome_signin_client.cc
diff --git a/chrome/browser/signin/chrome_signin_client.cc b/chrome/browser/signin/chrome_signin_client.cc
index 82e1663dc56d09cca95177a1f1c6156954ea6414..680c9e95801dba5de3fc4e547064dcd634f4a5b6 100644
--- a/chrome/browser/signin/chrome_signin_client.cc
+++ b/chrome/browser/signin/chrome_signin_client.cc
@@ -23,8 +23,6 @@
#include "components/signin/core/common/profile_management_switches.h"
#include "components/signin/core/common/signin_pref_names.h"
#include "components/signin/core/common/signin_switches.h"
-#include "content/public/browser/render_process_host.h"
-#include "content/public/common/child_process_host.h"
#include "net/url_request/url_request_context_getter.h"
#include "url/gurl.h"
@@ -40,9 +38,6 @@
#include "chrome/browser/first_run/first_run.h"
#endif
-using content::ChildProcessHost;
-using content::RenderProcessHost;
-
namespace {
const char kGoogleAccountsUrl[] = "https://accounts.google.com";
@@ -52,18 +47,12 @@ const char kGoogleAccountsUrl[] = "https://accounts.google.com";
ChromeSigninClient::ChromeSigninClient(
Profile* profile, SigninErrorController* signin_error_controller)
: profile_(profile),
- signin_error_controller_(signin_error_controller),
- signin_host_id_(ChildProcessHost::kInvalidUniqueID) {
+ signin_error_controller_(signin_error_controller) {
signin_error_controller_->AddObserver(this);
}
ChromeSigninClient::~ChromeSigninClient() {
signin_error_controller_->RemoveObserver(this);
- std::set<RenderProcessHost*>::iterator i;
- for (i = signin_hosts_observed_.begin(); i != signin_hosts_observed_.end();
- ++i) {
- (*i)->RemoveObserver(this);
- }
}
// static
@@ -81,41 +70,6 @@ bool ChromeSigninClient::SettingsAllowSigninCookies(
GURL(kGoogleAccountsUrl));
}
-void ChromeSigninClient::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 ChromeSigninClient::ClearSigninProcess() {
- signin_host_id_ = ChildProcessHost::kInvalidUniqueID;
-}
-
-bool ChromeSigninClient::IsSigninProcess(int process_id) const {
- return process_id != ChildProcessHost::kInvalidUniqueID &&
- process_id == signin_host_id_;
-}
-
-bool ChromeSigninClient::HasSigninProcess() const {
- return signin_host_id_ != ChildProcessHost::kInvalidUniqueID;
-}
-
-void ChromeSigninClient::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;
-}
-
PrefService* ChromeSigninClient::GetPrefs() { return profile_->GetPrefs(); }
scoped_refptr<TokenWebData> ChromeSigninClient::GetDatabase() {
« no previous file with comments | « chrome/browser/signin/chrome_signin_client.h ('k') | chrome/browser/signin/signin_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698