diff options
author | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 17:58:24 +0000 |
---|---|---|
committer | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 17:58:24 +0000 |
commit | 4a63ae1381005ba988ca6f49a6c9256ab634db12 (patch) | |
tree | a6724dec3bc9c24646e2e296d9cda8f4977b5358 /chrome/browser/importer/firefox_profile_lock.h | |
parent | b6e97b66c5777bbd1c5fef47a77247f6a3fb319e (diff) | |
download | chromium_src-4a63ae1381005ba988ca6f49a6c9256ab634db12.zip chromium_src-4a63ae1381005ba988ca6f49a6c9256ab634db12.tar.gz chromium_src-4a63ae1381005ba988ca6f49a6c9256ab634db12.tar.bz2 |
Enable Firefox import on OS X. No UI yet.
Review URL: http://codereview.chromium.org/143001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19381 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer/firefox_profile_lock.h')
-rw-r--r-- | chrome/browser/importer/firefox_profile_lock.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/browser/importer/firefox_profile_lock.h b/chrome/browser/importer/firefox_profile_lock.h index 1474869..1c1c7ee 100644 --- a/chrome/browser/importer/firefox_profile_lock.h +++ b/chrome/browser/importer/firefox_profile_lock.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 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. @@ -84,6 +84,7 @@ class FirefoxProfileLock { FRIEND_TEST(FirefoxImporterTest, ProfileLockOrphaned); static const FilePath::CharType* kLockFileName; + static const FilePath::CharType* kOldLockFileName; void Init(); @@ -95,6 +96,16 @@ class FirefoxProfileLock { HANDLE lock_handle_; #elif defined(OS_POSIX) int lock_fd_; + + // On Posix systems Firefox apparently first tries to put a fcntl lock + // on a file and if that fails, it does a regular exculsive open on another + // file. This variable contains the location of this other file. + FilePath old_lock_file_; + + // Method that tries to put a fcntl lock on file specified by |lock_file_|. + // Returns false if lock is already help by another process. true in all + // other cases. + bool LockWithFcntl(); #endif DISALLOW_COPY_AND_ASSIGN(FirefoxProfileLock); |