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

Unified Diff: remoting/host/setup/win/auth_code_getter.cc

Issue 11343050: [Chromoting] Make the AuthCodeGetter component of the Windows host configurer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use a simpler idiom. Created 8 years, 2 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 | « remoting/host/setup/win/auth_code_getter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/setup/win/auth_code_getter.cc
diff --git a/remoting/host/setup/win/auth_code_getter.cc b/remoting/host/setup/win/auth_code_getter.cc
index 89ce104b8f347a729b8153675b07a076a7a0c19a..6b3944dc8dfa243995dff10d54188f56ecbdc432 100644
--- a/remoting/host/setup/win/auth_code_getter.cc
+++ b/remoting/host/setup/win/auth_code_getter.cc
@@ -18,7 +18,6 @@ namespace remoting {
AuthCodeGetter::AuthCodeGetter() :
browser_(NULL),
- browser_running_(false),
timer_interval_(base::TimeDelta::FromMilliseconds(kUrlPollIntervalMs)) {
}
@@ -28,7 +27,7 @@ AuthCodeGetter::~AuthCodeGetter() {
void AuthCodeGetter::GetAuthCode(
base::Callback<void(const std::string&)> on_auth_code) {
- if (browser_running_) {
+ if (browser_) {
on_auth_code.Run("");
return;
}
@@ -39,7 +38,6 @@ void AuthCodeGetter::GetAuthCode(
on_auth_code_.Run("");
return;
}
- browser_running_ = true;
base::win::ScopedBstr url(UTF8ToWide(
GetOauthStartUrl(GetDefaultOauthRedirectUrl())).c_str());
base::win::ScopedVariant empty_variant;
@@ -69,7 +67,7 @@ void AuthCodeGetter::OnTimer() {
bool AuthCodeGetter::TestBrowserUrl(std::string* auth_code) {
*auth_code = "";
- if (!browser_running_) {
+ if (!browser_) {
return true;
}
base::win::ScopedBstr url;
@@ -88,9 +86,9 @@ bool AuthCodeGetter::TestBrowserUrl(std::string* auth_code) {
}
void AuthCodeGetter::KillBrowser() {
- if (browser_running_) {
+ if (browser_) {
browser_->Quit();
- browser_running_ = false;
+ browser_.Release();
}
}
« no previous file with comments | « remoting/host/setup/win/auth_code_getter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698