diff options
author | scottbyer@chromium.org <scottbyer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-23 21:39:09 +0000 |
---|---|---|
committer | scottbyer@chromium.org <scottbyer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-23 21:39:09 +0000 |
commit | a8e23d42aaee13b4c67ed62729dd3c74c69ccb9b (patch) | |
tree | bddb7c1eaa2be84c5224efd7bb3bec3639551fc8 /chrome/common/service_process_util_linux.cc | |
parent | 912a03c7587ba6aa77ff65372815ae26ceb99e9d (diff) | |
download | chromium_src-a8e23d42aaee13b4c67ed62729dd3c74c69ccb9b.zip chromium_src-a8e23d42aaee13b4c67ed62729dd3c74c69ccb9b.tar.gz chromium_src-a8e23d42aaee13b4c67ed62729dd3c74c69ccb9b.tar.bz2 |
Cloud Print Policy - service side enforcement, Mac browser tests.
Enhance MockLaunchd to the point where it can easily be injected into full
service process browser/multiprocess tests, letting those tests run on the
Mac. This gets us to the point where we can more browser/service process
interaction test coverage.
BUG=98049
TEST=none
Review URL: http://codereview.chromium.org/9131016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118744 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/service_process_util_linux.cc')
-rw-r--r-- | chrome/common/service_process_util_linux.cc | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/chrome/common/service_process_util_linux.cc b/chrome/common/service_process_util_linux.cc index 457a50c..0e912d0 100644 --- a/chrome/common/service_process_util_linux.cc +++ b/chrome/common/service_process_util_linux.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -18,27 +18,6 @@ namespace { -// Attempts to take a lock named |name|. If |waiting| is true then this will -// make multiple attempts to acquire the lock. -// Caller is responsible for ownership of the MultiProcessLock. -MultiProcessLock* TakeNamedLock(const std::string& name, bool waiting) { - scoped_ptr<MultiProcessLock> lock(MultiProcessLock::Create(name)); - if (lock == NULL) return NULL; - bool got_lock = false; - for (int i = 0; i < 10; ++i) { - if (lock->TryLock()) { - got_lock = true; - break; - } - if (!waiting) break; - base::PlatformThread::Sleep(100 * i); - } - if (!got_lock) { - lock.reset(); - } - return lock.release(); -} - MultiProcessLock* TakeServiceInitializingLock(bool waiting) { std::string lock_name = GetServiceProcessScopedName("_service_initializing"); |