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

Unified Diff: chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc

Issue 23885002: Add WebRTC logging extension API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 3 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/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc
diff --git a/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc b/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc
new file mode 100644
index 0000000000000000000000000000000000000000..16819e7c106efc7b57cc05e20a0d9b85591abdd4
--- /dev/null
+++ b/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc
@@ -0,0 +1,118 @@
+// Copyright 2013 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/extensions/api/webrtc_logging_private/webrtc_logging_private_api.h"
+
+#include "base/logging.h"
+#include "content/public/browser/browser_thread.h"
+
+namespace extensions {
+
+namespace SetMetaData = api::webrtc_logging_private::SetMetaData;
+namespace SetUploadOnRenderClose =
+ api::webrtc_logging_private::SetUploadOnRenderClose;
+
+WebrtcLoggingPrivateSetMetaDataFunction::
+WebrtcLoggingPrivateSetMetaDataFunction() {}
+
+WebrtcLoggingPrivateSetMetaDataFunction::
+~WebrtcLoggingPrivateSetMetaDataFunction() {}
+
+bool WebrtcLoggingPrivateSetMetaDataFunction::RunImpl() {
+ scoped_ptr<SetMetaData::Params> params(SetMetaData::Params::Create(*args_));
+ EXTENSION_FUNCTION_VALIDATE(params.get());
+
+ // TODO(grunell): Implement.
+ NOTIMPLEMENTED();
+ return false;
+}
+
+WebrtcLoggingPrivateStartFunction::WebrtcLoggingPrivateStartFunction() {}
+
+WebrtcLoggingPrivateStartFunction::~WebrtcLoggingPrivateStartFunction() {}
+
+bool WebrtcLoggingPrivateStartFunction::RunImpl() {
+ // TODO(grunell): Implement.
+ NOTIMPLEMENTED();
+ return false;
+}
+
+void WebrtcLoggingPrivateStartFunction::StartCallback(bool success) {
+ DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ // TODO(grunell): Implement set lastError.
+ NOTIMPLEMENTED();
+ SendResponse(success);
+}
+
+WebrtcLoggingPrivateSetUploadOnRenderCloseFunction::
+WebrtcLoggingPrivateSetUploadOnRenderCloseFunction() {}
+
+WebrtcLoggingPrivateSetUploadOnRenderCloseFunction::
+~WebrtcLoggingPrivateSetUploadOnRenderCloseFunction() {}
+
+bool WebrtcLoggingPrivateSetUploadOnRenderCloseFunction::RunImpl() {
+ scoped_ptr<SetUploadOnRenderClose::Params> params(
+ SetUploadOnRenderClose::Params::Create(*args_));
+ EXTENSION_FUNCTION_VALIDATE(params.get());
+
+ // TODO(grunell): Implement.
+ NOTIMPLEMENTED();
+ return false;
+}
+
+WebrtcLoggingPrivateStopFunction::WebrtcLoggingPrivateStopFunction() {}
+
+WebrtcLoggingPrivateStopFunction::~WebrtcLoggingPrivateStopFunction() {}
+
+bool WebrtcLoggingPrivateStopFunction::RunImpl() {
+ // TODO(grunell): Implement.
+ NOTIMPLEMENTED();
+ return false;
+}
+
+void WebrtcLoggingPrivateStopFunction::StopCallback(bool success) {
+ DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ // TODO(grunell): Implement set lastError.
+ NOTIMPLEMENTED();
+ SendResponse(success);
+}
+
+WebrtcLoggingPrivateUploadFunction::WebrtcLoggingPrivateUploadFunction() {}
+
+WebrtcLoggingPrivateUploadFunction::~WebrtcLoggingPrivateUploadFunction() {}
+
+bool WebrtcLoggingPrivateUploadFunction::RunImpl() {
+ // TODO(grunell): Implement.
+ NOTIMPLEMENTED();
+ return false;
+}
+
+void WebrtcLoggingPrivateUploadFunction::UploadCallback(
+ bool success, std::string report_id) {
+ DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ api::webrtc_logging_private::UploadResult result;
+ result.report_id = report_id;
+ // TODO(grunell): Implement set lastError.
+ NOTIMPLEMENTED();
+ SendResponse(success);
+}
+
+WebrtcLoggingPrivateDiscardFunction::WebrtcLoggingPrivateDiscardFunction() {}
+
+WebrtcLoggingPrivateDiscardFunction::~WebrtcLoggingPrivateDiscardFunction() {}
+
+bool WebrtcLoggingPrivateDiscardFunction::RunImpl() {
+ // TODO(grunell): Implement.
+ NOTIMPLEMENTED();
+ return false;
+}
+
+void WebrtcLoggingPrivateDiscardFunction::DiscardCallback(bool success) {
+ DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ // TODO(grunell): Implement set lastError.
+ NOTIMPLEMENTED();
+ SendResponse(success);
+}
+
+} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698