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

Unified Diff: chrome/browser/devtools/device/webrtc/send_command_request.cc

Issue 1560583002: DevTools: remove experimental webrtc-based remote debugging device provider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more tests/gyp removals Created 4 years, 11 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
Index: chrome/browser/devtools/device/webrtc/send_command_request.cc
diff --git a/chrome/browser/devtools/device/webrtc/send_command_request.cc b/chrome/browser/devtools/device/webrtc/send_command_request.cc
deleted file mode 100644
index 7bfe5f402cb4505a5b77d33ae9bba1010248e559..0000000000000000000000000000000000000000
--- a/chrome/browser/devtools/device/webrtc/send_command_request.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/devtools/device/webrtc/send_command_request.h"
-
-#include "base/json/json_writer.h"
-#include "base/values.h"
-#include "components/cloud_devices/common/cloud_devices_urls.h"
-#include "net/base/url_util.h"
-
-using local_discovery::GCDApiFlow;
-using local_discovery::GCDApiFlowRequest;
-
-namespace {
-
-const char kContentTypeJSON[] = "application/json";
-const char kCommandTimeoutMs[] = "20000";
-
-} // namespace
-
-SendCommandRequest::SendCommandRequest(const base::DictionaryValue* request,
- Delegate* delegate)
- : delegate_(delegate) {
- base::JSONWriter::Write(*request, &upload_data_);
- DCHECK(delegate_);
-}
-
-net::URLFetcher::RequestType SendCommandRequest::GetRequestType() {
- return net::URLFetcher::POST;
-}
-
-void SendCommandRequest::GetUploadData(std::string* upload_type,
- std::string* upload_data) {
- *upload_type = kContentTypeJSON;
- *upload_data = upload_data_;
-}
-
-void SendCommandRequest::OnGCDAPIFlowError(GCDApiFlow::Status status) {
- delegate_->OnCommandFailed();
-}
-
-void SendCommandRequest::OnGCDAPIFlowComplete(
- const base::DictionaryValue& value) {
- delegate_->OnCommandSucceeded(value);
-}
-
-GURL SendCommandRequest::GetURL() {
- GURL url = cloud_devices::GetCloudDevicesRelativeURL("commands");
- url = net::AppendQueryParameter(url, "expireInMs", kCommandTimeoutMs);
- url = net::AppendQueryParameter(url, "responseAwaitMs", kCommandTimeoutMs);
- return url;
-}

Powered by Google App Engine
This is Rietveld 408576698