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

Unified Diff: mojo/public/cpp/bindings/tests/handle_passing_unittest.cc

Issue 280003003: Add SetClient method implementation to InterfaceImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 | « mojo/public/cpp/bindings/no_interface.h ('k') | mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/tests/handle_passing_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc b/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc
index 2cbd789b4411cc8d2b6532c66636efa0a28bec84..264e7b31bf8bbc83cd3d5a92828704e2375cce28 100644
--- a/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc
@@ -22,10 +22,6 @@ class SampleFactoryImpl : public InterfaceImpl<sample::Factory> {
delete this;
}
- virtual void SetClient(sample::FactoryClient* client) MOJO_OVERRIDE {
- client_ = client;
- }
-
virtual void DoStuff(const sample::Request& request,
ScopedMessagePipeHandle pipe) MOJO_OVERRIDE {
std::string text1;
@@ -50,7 +46,7 @@ class SampleFactoryImpl : public InterfaceImpl<sample::Factory> {
sample::Response::Builder response;
response.set_x(2);
response.set_pipe(pipe0.Pass());
- client_->DidStuff(response.Finish(), text1);
+ client()->DidStuff(response.Finish(), text1);
}
virtual void DoStuff2(ScopedDataPipeConsumerHandle pipe) MOJO_OVERRIDE {
@@ -69,11 +65,10 @@ class SampleFactoryImpl : public InterfaceImpl<sample::Factory> {
MOJO_READ_DATA_FLAG_ALL_OR_NONE));
AllocationScope scope;
- client_->DidStuff2(String(std::string(data)));
+ client()->DidStuff2(String(std::string(data)));
}
private:
- sample::FactoryClient* client_;
ScopedMessagePipeHandle pipe1_;
};
« no previous file with comments | « mojo/public/cpp/bindings/no_interface.h ('k') | mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698