diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-01 19:10:18 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-01 19:10:18 +0000 |
commit | 2011cae921b2d88be4b8e4f31197dd8bdd2c56b3 (patch) | |
tree | 8fa84ba0161024c9c23116144f353541184f0ce5 /chrome/browser/importer/firefox_profile_lock.h | |
parent | 9866440c2a379bab6fa7e1947405df00958ca3b9 (diff) | |
download | chromium_src-2011cae921b2d88be4b8e4f31197dd8bdd2c56b3.zip chromium_src-2011cae921b2d88be4b8e4f31197dd8bdd2c56b3.tar.gz chromium_src-2011cae921b2d88be4b8e4f31197dd8bdd2c56b3.tar.bz2 |
browser porting, part 2 - importer
Review URL: http://codereview.chromium.org/12688
Patch from Pawel Hajdan jr.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6149 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 | 18 |
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__ |