summaryrefslogtreecommitdiffstats
path: root/chrome/browser/remoting
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
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')
-rw-r--r--chrome/browser/remoting/remoting_resources_source.cc4
-rw-r--r--chrome/browser/remoting/remoting_setup_flow.cc25
-rw-r--r--chrome/browser/remoting/resources/setup_done.html6
3 files changed, 18 insertions, 17 deletions
diff --git a/chrome/browser/remoting/remoting_resources_source.cc b/chrome/browser/remoting/remoting_resources_source.cc
index 984bc53..f49e335 100644
--- a/chrome/browser/remoting/remoting_resources_source.cc
+++ b/chrome/browser/remoting/remoting_resources_source.cc
@@ -51,7 +51,9 @@ void RemotingResourcesSource::StartDataRequest(const std::string& path_raw,
localized_strings.SetString("settingupsync",
l10n_util::GetStringUTF16(IDS_SYNC_LOGIN_SETTING_UP_SYNC));
- localized_strings.SetString("introduction", "");
+ localized_strings.SetString("introduction",
+ ASCIIToUTF16("Remoting ") +
+ l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
localized_strings.SetString("signinprefix",
l10n_util::GetStringUTF16(IDS_SYNC_LOGIN_SIGNIN_PREFIX));
localized_strings.SetString("signinsuffix",
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);
diff --git a/chrome/browser/remoting/resources/setup_done.html b/chrome/browser/remoting/resources/setup_done.html
index 70311f8..88a365c 100644
--- a/chrome/browser/remoting/resources/setup_done.html
+++ b/chrome/browser/remoting/resources/setup_done.html
@@ -44,7 +44,8 @@ html[os='mac'] input[type='submit'] {
</style>
<script>
function setShowFirstTimeSetupSummary() {
- // TODO(hclam): Show the information for the first time setup.
+ document.getElementById("summary").innerHTML =
+ templateData['firsttimesetupsummary'];
}
function setMessage(msg) {
document.getElementById('msgContent').innerHTML = msg;
@@ -56,7 +57,8 @@ html[os='mac'] input[type='submit'] {
</head>
<body i18n-values=".style.fontFamily:fontfamily">
<div class="remoting-header" i18n-content="success"></div>
- <div id="msgContent">Setup completed.</div>
+ <div id="msgContent"></div>
+ <div id="summary" i18n-content="setupsummary"></div>
<div class="remoting-footer">
<input id="close" type="submit" i18n-values="value:okay"
onclick='chrome.send("DialogClose", [""])' />