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

Unified Diff: remoting/client/client_util.cc

Issue 3064009: Initial scriptable object implementation. (Closed)
Patch Set: Fix alpha's style nits. Created 10 years, 5 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/client/client_util.h ('k') | remoting/client/client_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/client_util.cc
diff --git a/remoting/client/client_util.cc b/remoting/client/client_util.cc
index 215ae9c2fccf1b05bbb0d699ab42cec2d54e19c4..28bd7cc8d1f027db0cd03b6fdc02d016cf76c08a 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
« no previous file with comments | « remoting/client/client_util.h ('k') | remoting/client/client_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698