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

Unified Diff: chrome/common/service_process_util_linux.cc

Issue 9131016: Cloud Print Policy - service side enforcement, Mac browser tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address nit + REBASE Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/service_process_util.h ('k') | chrome/common/service_process_util_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/service_process_util_linux.cc
diff --git a/chrome/common/service_process_util_linux.cc b/chrome/common/service_process_util_linux.cc
index 457a50c5e663ef3673c60a7cd6ce05e62b04b805..0e912d0df221491d93beafbf9ec571df74808eb1 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");
« no previous file with comments | « chrome/common/service_process_util.h ('k') | chrome/common/service_process_util_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698