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

Side by Side Diff: chrome/browser/sync/test/integration/sync_test.cc

Issue 999033003: Remove uses of KillProcess() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
OLDNEW
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/sync/test/integration/sync_test.h" 5 #include "chrome/browser/sync/test/integration/sync_test.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 if (!sync_server_.Stop()) { 823 if (!sync_server_.Stop()) {
824 LOG(ERROR) << "Could not stop local python test server."; 824 LOG(ERROR) << "Could not stop local python test server.";
825 return false; 825 return false;
826 } 826 }
827 xmpp_port_.reset(); 827 xmpp_port_.reset();
828 return true; 828 return true;
829 } 829 }
830 830
831 bool SyncTest::TearDownLocalTestServer() { 831 bool SyncTest::TearDownLocalTestServer() {
832 if (test_server_.IsValid()) { 832 if (test_server_.IsValid()) {
833 EXPECT_TRUE(base::KillProcess(test_server_.Handle(), 0, false)) 833 EXPECT_TRUE(test_server_.Terminate(0, false))
834 << "Could not stop local test server."; 834 << "Could not stop local test server.";
835 test_server_.Close(); 835 test_server_.Close();
836 } 836 }
837 return true; 837 return true;
838 } 838 }
839 839
840 bool SyncTest::WaitForTestServerToStart(base::TimeDelta wait, int intervals) { 840 bool SyncTest::WaitForTestServerToStart(base::TimeDelta wait, int intervals) {
841 for (int i = 0; i < intervals; ++i) { 841 for (int i = 0; i < intervals; ++i) {
842 if (IsTestServerRunning()) 842 if (IsTestServerRunning())
843 return true; 843 return true;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 BrowserThread::PostTask( 1001 BrowserThread::PostTask(
1002 BrowserThread::IO, FROM_HERE, 1002 BrowserThread::IO, FROM_HERE,
1003 base::Bind(&SetupNetworkCallback, &done, 1003 base::Bind(&SetupNetworkCallback, &done,
1004 make_scoped_refptr(context_getter))); 1004 make_scoped_refptr(context_getter)));
1005 done.Wait(); 1005 done.Wait();
1006 } 1006 }
1007 1007
1008 fake_server::FakeServer* SyncTest::GetFakeServer() const { 1008 fake_server::FakeServer* SyncTest::GetFakeServer() const {
1009 return fake_server_.get(); 1009 return fake_server_.get();
1010 } 1010 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698