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

Unified Diff: webrtc/modules/utility/source/process_thread_impl.h

Issue 2729053002: Add location to RegisterModule (Closed)
Patch Set: Format BUILD.gn Created 3 years, 10 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: webrtc/modules/utility/source/process_thread_impl.h
diff --git a/webrtc/modules/utility/source/process_thread_impl.h b/webrtc/modules/utility/source/process_thread_impl.h
index 510ab52daf3651285f231aeae66be1aa0e6ad7b0..e07c3d7c8ba523acb1c8455b9ba826b4f7398598 100644
--- a/webrtc/modules/utility/source/process_thread_impl.h
+++ b/webrtc/modules/utility/source/process_thread_impl.h
@@ -16,6 +16,7 @@
#include <queue>
#include "webrtc/base/criticalsection.h"
+#include "webrtc/base/location.h"
#include "webrtc/base/platform_thread.h"
#include "webrtc/base/thread_checker.h"
#include "webrtc/modules/utility/include/process_thread.h"
@@ -35,7 +36,7 @@ class ProcessThreadImpl : public ProcessThread {
void WakeUp(Module* module) override;
void PostTask(std::unique_ptr<rtc::QueuedTask> task) override;
- void RegisterModule(Module* module) override;
+ void RegisterModule(Module* module, const rtc::Location& from) override;
void DeRegisterModule(Module* module) override;
protected:
@@ -44,16 +45,18 @@ class ProcessThreadImpl : public ProcessThread {
private:
struct ModuleCallback {
- ModuleCallback() : module(nullptr), next_callback(0) {}
- ModuleCallback(const ModuleCallback& cb)
- : module(cb.module), next_callback(cb.next_callback) {}
- ModuleCallback(Module* module) : module(module), next_callback(0) {}
+ ModuleCallback() = delete;
+ ModuleCallback(ModuleCallback&& cb) = default;
+ ModuleCallback(const ModuleCallback& cb) = default;
+ ModuleCallback(Module* module, const rtc::Location& location)
+ : module(module), location(location) {}
bool operator==(const ModuleCallback& cb) const {
return cb.module == module;
}
Module* const module;
- int64_t next_callback; // Absolute timestamp.
+ int64_t next_callback = 0; // Absolute timestamp.
+ const rtc::Location location;
private:
ModuleCallback& operator=(ModuleCallback&);
« no previous file with comments | « webrtc/modules/utility/include/process_thread.h ('k') | webrtc/modules/utility/source/process_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698