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_time_service_impl.h" | 5 #include "mojo/services/test_service/test_time_service_impl.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
12 #include "mojo/application/public/cpp/application_impl.h" | |
13 #include "mojo/services/test_service/test_request_tracker.mojom.h" | 12 #include "mojo/services/test_service/test_request_tracker.mojom.h" |
14 #include "mojo/services/test_service/tracked_service.h" | 13 #include "mojo/services/test_service/tracked_service.h" |
| 14 #include "mojo/shell/public/cpp/application_impl.h" |
15 | 15 |
16 namespace mojo { | 16 namespace mojo { |
17 namespace test { | 17 namespace test { |
18 | 18 |
19 TestTimeServiceImpl::TestTimeServiceImpl( | 19 TestTimeServiceImpl::TestTimeServiceImpl( |
20 ApplicationImpl* app_impl, | 20 ApplicationImpl* app_impl, |
21 InterfaceRequest<TestTimeService> request) | 21 InterfaceRequest<TestTimeService> request) |
22 : app_impl_(app_impl), binding_(this, std::move(request)) {} | 22 : app_impl_(app_impl), binding_(this, std::move(request)) {} |
23 | 23 |
24 TestTimeServiceImpl::~TestTimeServiceImpl() { | 24 TestTimeServiceImpl::~TestTimeServiceImpl() { |
(...skipping 13 matching lines...) Expand all Loading... |
38 base::Time frozen_time(base::Time::UnixEpoch() | 38 base::Time frozen_time(base::Time::UnixEpoch() |
39 + base::TimeDelta::FromDays(10957) | 39 + base::TimeDelta::FromDays(10957) |
40 + base::TimeDelta::FromHours(7) | 40 + base::TimeDelta::FromHours(7) |
41 + base::TimeDelta::FromMinutes(59)); | 41 + base::TimeDelta::FromMinutes(59)); |
42 int64_t time(frozen_time.ToInternalValue()); | 42 int64_t time(frozen_time.ToInternalValue()); |
43 callback.Run(time); | 43 callback.Run(time); |
44 } | 44 } |
45 | 45 |
46 } // namespace test | 46 } // namespace test |
47 } // namespace mojo | 47 } // namespace mojo |
OLD | NEW |