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

Side by Side Diff: chrome/browser/signin/signin_manager.cc

Issue 192313002: Make ChromeSigninClient a BrowserContextKeyedService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/signin/signin_manager.h ('k') | chrome/browser/signin/signin_manager_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/signin/signin_manager.h" 5 #include "chrome/browser/signin/signin_manager.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 return false; 75 return false;
76 76
77 // Any login UI URLs with signin=chromiumsync should be considered a web 77 // Any login UI URLs with signin=chromiumsync should be considered a web
78 // URL (relies on GAIA keeping the "service=chromiumsync" query string 78 // URL (relies on GAIA keeping the "service=chromiumsync" query string
79 // fragment present even when embedding inside a "continue" parameter). 79 // fragment present even when embedding inside a "continue" parameter).
80 return net::UnescapeURLComponent( 80 return net::UnescapeURLComponent(
81 url.query(), net::UnescapeRule::URL_SPECIAL_CHARS) 81 url.query(), net::UnescapeRule::URL_SPECIAL_CHARS)
82 .find(kChromiumSyncService) != std::string::npos; 82 .find(kChromiumSyncService) != std::string::npos;
83 } 83 }
84 84
85 SigninManager::SigninManager(scoped_ptr<SigninClient> client) 85 SigninManager::SigninManager(SigninClient* client)
86 : prohibit_signout_(false), 86 : prohibit_signout_(false),
87 had_two_factor_error_(false), 87 had_two_factor_error_(false),
88 type_(SIGNIN_TYPE_NONE), 88 type_(SIGNIN_TYPE_NONE),
89 weak_pointer_factory_(this), 89 weak_pointer_factory_(this),
90 signin_host_id_(ChildProcessHost::kInvalidUniqueID), 90 signin_host_id_(ChildProcessHost::kInvalidUniqueID),
91 client_(client.Pass()) {} 91 client_(client) {}
92 92
93 void SigninManager::SetSigninProcess(int process_id) { 93 void SigninManager::SetSigninProcess(int process_id) {
94 if (process_id == signin_host_id_) 94 if (process_id == signin_host_id_)
95 return; 95 return;
96 DLOG_IF(WARNING, 96 DLOG_IF(WARNING,
97 signin_host_id_ != ChildProcessHost::kInvalidUniqueID) 97 signin_host_id_ != ChildProcessHost::kInvalidUniqueID)
98 << "Replacing in-use signin process."; 98 << "Replacing in-use signin process.";
99 signin_host_id_ = process_id; 99 signin_host_id_ = process_id;
100 RenderProcessHost* host = RenderProcessHost::FromID(process_id); 100 RenderProcessHost* host = RenderProcessHost::FromID(process_id);
101 DCHECK(host); 101 DCHECK(host);
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 signin_host_id_ = ChildProcessHost::kInvalidUniqueID; 663 signin_host_id_ = ChildProcessHost::kInvalidUniqueID;
664 } 664 }
665 665
666 void SigninManager::ProhibitSignout(bool prohibit_signout) { 666 void SigninManager::ProhibitSignout(bool prohibit_signout) {
667 prohibit_signout_ = prohibit_signout; 667 prohibit_signout_ = prohibit_signout;
668 } 668 }
669 669
670 bool SigninManager::IsSignoutProhibited() const { 670 bool SigninManager::IsSignoutProhibited() const {
671 return prohibit_signout_; 671 return prohibit_signout_;
672 } 672 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_manager.h ('k') | chrome/browser/signin/signin_manager_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698