OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "mojo/services/test_service/test_service_impl.h" | 5 #include "mojo/services/test_service/test_service_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/i18n/time_formatting.h" | 8 #include "base/i18n/time_formatting.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "mojo/public/cpp/application/application_connection.h" | 10 #include "mojo/public/cpp/application/application_connection.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 if (tracking_) { | 50 if (tracking_) { |
51 tracking_->RecordNewRequest(); | 51 tracking_->RecordNewRequest(); |
52 time_service_->StartTrackingRequests(mojo::Callback<void()>()); | 52 time_service_->StartTrackingRequests(mojo::Callback<void()>()); |
53 } | 53 } |
54 time_service_->GetPartyTime(base::Bind(&SendTimeResponse, callback)); | 54 time_service_->GetPartyTime(base::Bind(&SendTimeResponse, callback)); |
55 } | 55 } |
56 | 56 |
57 void TestServiceImpl::StartTrackingRequests( | 57 void TestServiceImpl::StartTrackingRequests( |
58 const mojo::Callback<void()>& callback) { | 58 const mojo::Callback<void()>& callback) { |
59 TestRequestTrackerPtr tracker; | 59 TestRequestTrackerPtr tracker; |
60 connection_->ConnectToService( | 60 connection_->ConnectToService("mojo:test_request_tracker_app", &tracker); |
61 "mojo:mojo_test_request_tracker_app", &tracker); | |
62 tracking_.reset( | 61 tracking_.reset( |
63 new TestRequestTrackerClientImpl(tracker.Pass(), Name_, callback)); | 62 new TestRequestTrackerClientImpl(tracker.Pass(), Name_, callback)); |
64 } | 63 } |
65 | 64 |
66 } // namespace test | 65 } // namespace test |
67 } // namespace mojo | 66 } // namespace mojo |
OLD | NEW |