| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/service_process/service_process_control.h" | 5 #include "chrome/browser/service_process/service_process_control.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| 11 #include "base/message_loop/message_loop.h" |
| 11 #include "base/path_service.h" | 12 #include "base/path_service.h" |
| 12 #include "base/process/kill.h" | 13 #include "base/process/kill.h" |
| 13 #include "base/process/process.h" | 14 #include "base/process/process.h" |
| 14 #include "base/process/process_iterator.h" | 15 #include "base/process/process_iterator.h" |
| 15 #include "base/single_thread_task_runner.h" | 16 #include "base/single_thread_task_runner.h" |
| 16 #include "base/test/test_timeouts.h" | 17 #include "base/test/test_timeouts.h" |
| 17 #include "base/threading/thread_restrictions.h" | 18 #include "base/threading/thread_restrictions.h" |
| 18 #include "base/threading/thread_task_runner_handle.h" | 19 #include "base/threading/thread_task_runner_handle.h" |
| 19 #include "build/build_config.h" | 20 #include "build/build_config.h" |
| 20 #include "chrome/browser/ui/browser.h" | 21 #include "chrome/browser/ui/browser.h" |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 // Callback should not be called during GetHistograms call. | 369 // Callback should not be called during GetHistograms call. |
| 369 EXPECT_CALL(*this, MockHistogramsCallback()).Times(0); | 370 EXPECT_CALL(*this, MockHistogramsCallback()).Times(0); |
| 370 // Wait for real callback by providing large timeout value. | 371 // Wait for real callback by providing large timeout value. |
| 371 EXPECT_TRUE(ServiceProcessControl::GetInstance()->GetHistograms( | 372 EXPECT_TRUE(ServiceProcessControl::GetInstance()->GetHistograms( |
| 372 base::Bind(&ServiceProcessControlBrowserTest::HistogramsCallback, | 373 base::Bind(&ServiceProcessControlBrowserTest::HistogramsCallback, |
| 373 base::Unretained(this)), | 374 base::Unretained(this)), |
| 374 base::TimeDelta::FromHours(1))); | 375 base::TimeDelta::FromHours(1))); |
| 375 EXPECT_CALL(*this, MockHistogramsCallback()).Times(1); | 376 EXPECT_CALL(*this, MockHistogramsCallback()).Times(1); |
| 376 content::RunMessageLoop(); | 377 content::RunMessageLoop(); |
| 377 } | 378 } |
| OLD | NEW |