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

Side by Side Diff: shell/crash/crash_upload_unittests.cc

Issue 1682113003: Mojo C++ bindings: Generate InterfaceHandle<> instead of InterfacePtr<>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase ontop of master, address trung's comments Created 4 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 unified diff | Download patch
« no previous file with comments | « shell/application_manager/shell_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/files/file_enumerator.h" 6 #include "base/files/file_enumerator.h"
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 mojo::InterfaceRequest<mojo::TCPBoundSocket> bound_socket, 71 mojo::InterfaceRequest<mojo::TCPBoundSocket> bound_socket,
72 const CreateTCPBoundSocketCallback& callback) override {} 72 const CreateTCPBoundSocketCallback& callback) override {}
73 void CreateTCPConnectedSocket( 73 void CreateTCPConnectedSocket(
74 mojo::NetAddressPtr remote_address, 74 mojo::NetAddressPtr remote_address,
75 mojo::ScopedDataPipeConsumerHandle send_stream, 75 mojo::ScopedDataPipeConsumerHandle send_stream,
76 mojo::ScopedDataPipeProducerHandle receive_stream, 76 mojo::ScopedDataPipeProducerHandle receive_stream,
77 mojo::InterfaceRequest<mojo::TCPConnectedSocket> client_socket, 77 mojo::InterfaceRequest<mojo::TCPConnectedSocket> client_socket,
78 const CreateTCPConnectedSocketCallback& callback) override {} 78 const CreateTCPConnectedSocketCallback& callback) override {}
79 void CreateUDPSocket( 79 void CreateUDPSocket(
80 mojo::InterfaceRequest<mojo::UDPSocket> socket) override {} 80 mojo::InterfaceRequest<mojo::UDPSocket> socket) override {}
81 void CreateHttpServer(mojo::NetAddressPtr local_address, 81 void CreateHttpServer(
82 mojo::HttpServerDelegatePtr delegate, 82 mojo::NetAddressPtr local_address,
83 const CreateHttpServerCallback& callback) override {} 83 mojo::InterfaceHandle<mojo::HttpServerDelegate> delegate,
84 const CreateHttpServerCallback& callback) override {}
84 void RegisterURLLoaderInterceptor( 85 void RegisterURLLoaderInterceptor(
85 mojo::URLLoaderInterceptorFactoryPtr factory) override {} 86 mojo::InterfaceHandle<mojo::URLLoaderInterceptorFactory> factory)
87 override {}
86 void CreateHostResolver( 88 void CreateHostResolver(
87 mojo::InterfaceRequest<mojo::HostResolver> host_resolver) override {} 89 mojo::InterfaceRequest<mojo::HostResolver> host_resolver) override {}
88 90
89 MockURLLoader mock_url_loader_; 91 MockURLLoader mock_url_loader_;
90 mojo::Binding<mojo::URLLoader> binding_; 92 mojo::Binding<mojo::URLLoader> binding_;
91 }; 93 };
92 94
93 std::string GetDumpContent(const base::FilePath& path) { 95 std::string GetDumpContent(const base::FilePath& path) {
94 return "--" + path.BaseName().value() + "\r\n"; 96 return "--" + path.BaseName().value() + "\r\n";
95 } 97 }
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 203
202 EXPECT_TRUE(mock_network_service_.url_loader()->called()); 204 EXPECT_TRUE(mock_network_service_.url_loader()->called());
203 EXPECT_TRUE(base::PathExists(GetSentinelPath(dumps_dir_.path()))); 205 EXPECT_TRUE(base::PathExists(GetSentinelPath(dumps_dir_.path())));
204 EXPECT_EQ(GetDumpContent(dumps_dir_.path().Append("0.dmp")), 206 EXPECT_EQ(GetDumpContent(dumps_dir_.path().Append("0.dmp")),
205 mock_network_service_.url_loader()->GetLastContent()); 207 mock_network_service_.url_loader()->GetLastContent());
206 EXPECT_EQ(1, CountFiles(dumps_dir_.path())); 208 EXPECT_EQ(1, CountFiles(dumps_dir_.path()));
207 } 209 }
208 210
209 } // namespace 211 } // namespace
210 } // namespace breakpad 212 } // namespace breakpad
OLDNEW
« no previous file with comments | « shell/application_manager/shell_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698