OLD | NEW |
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/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 "Replacing in-use signin process."; | 96 "Replacing in-use signin process."; |
97 signin_process_id_ = process_id; | 97 signin_process_id_ = process_id; |
98 const content::RenderProcessHost* process = | 98 const content::RenderProcessHost* process = |
99 content::RenderProcessHost::FromID(process_id); | 99 content::RenderProcessHost::FromID(process_id); |
100 DCHECK(process); | 100 DCHECK(process); |
101 registrar_.Add(this, | 101 registrar_.Add(this, |
102 content::NOTIFICATION_RENDERER_PROCESS_TERMINATED, | 102 content::NOTIFICATION_RENDERER_PROCESS_TERMINATED, |
103 content::Source<content::RenderProcessHost>(process)); | 103 content::Source<content::RenderProcessHost>(process)); |
104 } | 104 } |
105 | 105 |
| 106 void SigninManager::ClearSigninProcess() { |
| 107 signin_process_id_ = kInvalidProcessId; |
| 108 } |
| 109 |
106 bool SigninManager::IsSigninProcess(int process_id) const { | 110 bool SigninManager::IsSigninProcess(int process_id) const { |
107 return process_id == signin_process_id_; | 111 return process_id == signin_process_id_; |
108 } | 112 } |
109 | 113 |
110 bool SigninManager::HasSigninProcess() const { | 114 bool SigninManager::HasSigninProcess() const { |
111 return signin_process_id_ != kInvalidProcessId; | 115 return signin_process_id_ != kInvalidProcessId; |
112 } | 116 } |
113 | 117 |
114 SigninManager::~SigninManager() { | 118 SigninManager::~SigninManager() { |
115 } | 119 } |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 } | 701 } |
698 } | 702 } |
699 | 703 |
700 void SigninManager::ProhibitSignout(bool prohibit_signout) { | 704 void SigninManager::ProhibitSignout(bool prohibit_signout) { |
701 prohibit_signout_ = prohibit_signout; | 705 prohibit_signout_ = prohibit_signout; |
702 } | 706 } |
703 | 707 |
704 bool SigninManager::IsSignoutProhibited() const { | 708 bool SigninManager::IsSignoutProhibited() const { |
705 return prohibit_signout_; | 709 return prohibit_signout_; |
706 } | 710 } |
OLD | NEW |