chandankharbanda5

Chrome MoJo Error

Mar 24th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. File Name: /src/net/interfaces/corp_data_sharing.mojom
  2.  
  3. module net.interfaces;
  4.  
  5. interface CorpDataSharing {
  6. SendMessage();
  7. };
  8.  
  9. ======================================================================================================================
  10.  
  11. File Name: /src/net/interfaces/corp_data_sharing_impl.cc
  12.  
  13. #include "net/interfaces/corp_data_sharing/corp_data_sharing.mojom.h"
  14. #include "mojo/public/cpp/bindings/binding.h"
  15. #include "mojo/public/cpp/bindings/interface_request.h"
  16.  
  17. namespace net {
  18. namespace interfaces {
  19. class CorpDataSharingImpl : public mojom::CorpDataSharing {
  20. public:
  21. CorpDataSharingImpl(mojom::CorpDataSharingRequest request)
  22. : binding_(this, std::move(request)) {}
  23. ~CorpDataSharingImpl() override {}
  24.  
  25. // mojom::Frobinator:
  26. void SendMessage() override { DLOG(INFO) << "I can't stop messaging!"; }
  27.  
  28. private:
  29. mojo::Binding<mojom::SendMessage> binding_;
  30. };
  31. }
  32. }
  33.  
  34. ======================================================================================================================
  35. File Name: /src/net/url_request/url_request_http_job.cc
  36.  
  37. //List of Added Header Files
  38. #include "net/dns/corp_data_sharing_impl.cc"
  39. #include "mojo/public/cpp/bindings/binding.h"
  40. #include "mojo/public/cpp/bindings/interface_request.h"
  41.  
  42. //List of Added Code
  43. interfaces::CorpDataSharingPtr corp_data_sharer;
  44. interfaces::CorpDataSharingImpl impl(MakeRequest(&corp_data_sharer));
  45.  
  46. // Tada!
  47. corp_data_sharer->SendMessage();
  48.  
  49. ======================================================================================================================
  50.  
  51. Error Received:
  52.  
  53. ../../net/url_request/url_request_http_job.cc:511:40: error: no matching function for call to 'MakeRequest'
  54. interfaces::CorpDataSharingImpl impl(MakeRequest(&corp_data_sharer));
  55. ^~~~~~~~~~~
  56. ../../mojo/public/cpp/bindings/interface_request.h:77:29: note: candidate template ignored: couldn't infer template argument 'Interface'
  57. InterfaceRequest<Interface> MakeRequest(ScopedMessagePipeHandle handle) {
  58. ^
  59. 1 error generated.
  60. ninja: build stopped: subcommand failed.
Add Comment
Please, Sign In to add comment