summaryrefslogtreecommitdiffstats
path: root/remoting/client/client_util.cc
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-28 01:23:17 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-28 01:23:17 +0000
commit0b75f6173ddaf3a82837903013eeabb29739e015 (patch)
tree0cccf20878ba646636e5e211adb6c81448a395ea /remoting/client/client_util.cc
parentb5f9de67c1231759039f1d0eced5143c7d911ce5 (diff)
downloadchromium_src-0b75f6173ddaf3a82837903013eeabb29739e015.zip
chromium_src-0b75f6173ddaf3a82837903013eeabb29739e015.tar.gz
chromium_src-0b75f6173ddaf3a82837903013eeabb29739e015.tar.bz2
Initial scriptable object implementation.
BUG=50248 TEST=write javascript to manually setup connection. Review URL: http://codereview.chromium.org/3064009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53892 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client/client_util.cc')
-rw-r--r--remoting/client/client_util.cc38
1 files changed, 0 insertions, 38 deletions
diff --git a/remoting/client/client_util.cc b/remoting/client/client_util.cc
index 215ae9c..28bd7cc 100644
--- a/remoting/client/client_util.cc
+++ b/remoting/client/client_util.cc
@@ -78,42 +78,4 @@ bool GetLoginInfoFromArgs(int argc, char** argv, ClientConfig* config) {
return true;
}
-// Get host JID from command line arguments, or stdin if not specified.
-bool GetLoginInfoFromUrlParams(const std::string& url, ClientConfig* config) {
- // TODO(ajwong): We should use GURL or something. Don't parse this by hand!
-
- // The Url should be of the form:
- //
- // chrome://remoting?user=<userid>&auth=<authtoken>&jid=<hostjid>
- //
- vector<string> parts;
- SplitString(url, '&', &parts);
- if (parts.size() != 3) {
- return false;
- }
-
- size_t pos = parts[0].rfind('=');
- if (pos == string::npos && (pos + 1) != string::npos) {
- return false;
- }
- std::string username = parts[0].substr(pos + 1);
-
- pos = parts[1].rfind('=');
- if (pos == string::npos && (pos + 1) != string::npos) {
- return false;
- }
- std::string auth_token = parts[1].substr(pos + 1);
-
- pos = parts[2].rfind('=');
- if (pos == string::npos && (pos + 1) != string::npos) {
- return false;
- }
- std::string host_jid = parts[2].substr(pos + 1);
-
- config->host_jid = host_jid;
- config->username = username;
- config->auth_token = auth_token;
- return true;
-}
-
} // namespace remoting