summaryrefslogtreecommitdiffstats
path: root/chrome/browser/remoting/remoting_setup_flow.cc
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-18 22:15:09 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-18 22:15:09 +0000
commitb9eb8b20e029cf288b36da336e4c5611c9a65a55 (patch)
tree4134579298bc01ebbedc060f511caa40902a8d84 /chrome/browser/remoting/remoting_setup_flow.cc
parentc3265d8866e5b0d2c1b129e4da685755a35a84b2 (diff)
downloadchromium_src-b9eb8b20e029cf288b36da336e4c5611c9a65a55.zip
chromium_src-b9eb8b20e029cf288b36da336e4c5611c9a65a55.tar.gz
chromium_src-b9eb8b20e029cf288b36da336e4c5611c9a65a55.tar.bz2
Revert 56600 - ServiceProcessControlBrowserTest.LaunchAndIPC crashes.
Start/stop service process when browser starts and stop Save the information that the setup of remoting has completed. After setup has been completed we start and stop service process when --enable-remoting presents when browser starts. Also save the information in the service process that host is registered and ready to be used. Again start chromoting host automatically once the host registration is done. Review URL: http://codereview.chromium.org/3185015 TBR=hclam@chromium.org Review URL: http://codereview.chromium.org/3107024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56610 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/remoting/remoting_setup_flow.cc')
-rw-r--r--chrome/browser/remoting/remoting_setup_flow.cc25
1 files changed, 11 insertions, 14 deletions
diff --git a/chrome/browser/remoting/remoting_setup_flow.cc b/chrome/browser/remoting/remoting_setup_flow.cc
index 1f4411b..27deaff 100644
--- a/chrome/browser/remoting/remoting_setup_flow.cc
+++ b/chrome/browser/remoting/remoting_setup_flow.cc
@@ -68,6 +68,14 @@ void RemotingSetupFlow::OnDialogClosed(const std::string& json_retval) {
delete this;
}
+// static
+void RemotingSetupFlow::GetArgsForGaiaLogin(DictionaryValue* args) {
+ args->SetString("iframeToShow", "login");
+ args->SetString("user", "");
+ args->SetInteger("error", 0);
+ args->SetBoolean("editable_user", true);
+}
+
void RemotingSetupFlow::GetDOMMessageHandlers(
std::vector<DOMMessageHandler*>* handlers) const {
// Create the message handler only after we are asked.
@@ -160,24 +168,13 @@ void RemotingSetupFlow::OnProcessLaunched() {
process_control_->EnableRemotingWithTokens(login_, remoting_token_,
sync_token_);
message_handler_->ShowSetupDone();
-
- // Save the preference that we have completed the setup of remoting.
- profile_->GetPrefs()->SetBoolean(prefs::kRemotingHasSetupCompleted, true);
}
// static
RemotingSetupFlow* RemotingSetupFlow::Run(Profile* profile) {
// Set the arguments for showing the gaia login page.
DictionaryValue args;
- args.SetString("iframeToShow", "login");
- args.SetString("user", "");
- args.SetInteger("error", 0);
- args.SetBoolean("editable_user", true);
-
- if (profile->GetPrefs()->GetBoolean(prefs::kRemotingHasSetupCompleted)) {
- args.SetString("iframeToShow", "done");
- }
-
+ GetArgsForGaiaLogin(&args);
std::string json_args;
base::JSONWriter::Write(&args, false, &json_args);
@@ -197,7 +194,7 @@ void OpenRemotingSetupDialog(Profile* profile) {
RemotingSetupFlow::Run(profile->GetOriginalProfile());
}
-// TODO(hclam): Need to refcount RemotingSetupFlow. I need to fix
-// lifetime of objects.
+// TODO(hclam): Need to refcount RemotingSetupFlow. I need to lifetime of
+// objects are all correct.
DISABLE_RUNNABLE_METHOD_REFCOUNT(RemotingSetupFlow);
DISABLE_RUNNABLE_METHOD_REFCOUNT(RemotingSetupMessageHandler);