summaryrefslogtreecommitdiffstats
path: root/chrome/browser/importer/firefox_profile_lock.h
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-12 11:33:28 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-12 11:33:28 +0000
commitd4f06fa99aa8f04fedbb336fe4e115831b2bc6ca (patch)
tree97fb1484630c693930a2e7a9f0918726400fe8d1 /chrome/browser/importer/firefox_profile_lock.h
parent0d50e405a5fe5af628eb16ecae38962ce371a39d (diff)
downloadchromium_src-d4f06fa99aa8f04fedbb336fe4e115831b2bc6ca.zip
chromium_src-d4f06fa99aa8f04fedbb336fe4e115831b2bc6ca.tar.gz
chromium_src-d4f06fa99aa8f04fedbb336fe4e115831b2bc6ca.tar.bz2
browser porting, part 2 - importer
Review URL: http://codereview.chromium.org/12688 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6885 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer/firefox_profile_lock.h')
-rw-r--r--chrome/browser/importer/firefox_profile_lock.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/chrome/browser/importer/firefox_profile_lock.h b/chrome/browser/importer/firefox_profile_lock.h
index c32d592..8b402cf 100644
--- a/chrome/browser/importer/firefox_profile_lock.h
+++ b/chrome/browser/importer/firefox_profile_lock.h
@@ -5,11 +5,16 @@
#ifndef CHROME_BROWSER_IMPORTER_FIREFOX_PROFILE_LOCK_H__
#define CHROME_BROWSER_IMPORTER_FIREFOX_PROFILE_LOCK_H__
+#include "build/build_config.h"
+
+#if defined(OS_WIN)
#include <windows.h>
+#endif
#include <string>
#include "base/basictypes.h"
+#include "base/file_path.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
// Firefox is designed to allow only one application to access its
@@ -78,16 +83,21 @@ class FirefoxProfileLock {
FRIEND_TEST(FirefoxImporterTest, ProfileLock);
FRIEND_TEST(FirefoxImporterTest, ProfileLockOrphaned);
- // The name of the lock file.
- static wchar_t kLockFileName[];
+ static const FilePath::CharType* kLockFileName;
+
+ void Init();
// Full path of the lock file in the profile folder.
- std::wstring lock_file_;
+ FilePath lock_file_;
// The handle of the lock file.
+#if defined(OS_WIN)
HANDLE lock_handle_;
+#elif defined(OS_POSIX)
+ int lock_fd_;
+#endif
- DISALLOW_EVIL_CONSTRUCTORS(FirefoxProfileLock);
+ DISALLOW_COPY_AND_ASSIGN(FirefoxProfileLock);
};
#endif // CHROME_BROWSER_IMPORTER_FIREFOX_PROFILE_LOCK_H__