diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-21 22:53:54 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-21 22:53:54 +0000 |
commit | 27e908b301f1fe34aa479a6b14c46379841f3029 (patch) | |
tree | 495125bded5b217fe76a295170d228a2e34c12c2 /rlz/lib/rlz_value_store.h | |
parent | ee914f9b498d65dde5f798ad10d422ab0dd3fc76 (diff) | |
download | chromium_src-27e908b301f1fe34aa479a6b14c46379841f3029.zip chromium_src-27e908b301f1fe34aa479a6b14c46379841f3029.tar.gz chromium_src-27e908b301f1fe34aa479a6b14c46379841f3029.tar.bz2 |
mac/rlz: Remove an incorrect check
As a comment in the ScopedRlzValueStoreLock destructor explains:
// Check that "store_ set" => "file_lock acquired". The converse isn't true,
// for example if the rlz data file can't be read.
So don't CHECK when that happens, instead treat it like lock acquisition failures:
Silently drop events when that happens. I added a unit test for this scenario.
Also pass O_RDWR to open(), as posix requires one of O_READ, O_WRITE, or O_RDWR.
BUG=143950
Review URL: https://chromiumcodereview.appspot.com/10828424
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152659 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'rlz/lib/rlz_value_store.h')
-rw-r--r-- | rlz/lib/rlz_value_store.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rlz/lib/rlz_value_store.h b/rlz/lib/rlz_value_store.h index d41421b..f45ac25 100644 --- a/rlz/lib/rlz_value_store.h +++ b/rlz/lib/rlz_value_store.h @@ -107,6 +107,9 @@ class ScopedRlzValueStoreLock { namespace testing { // Prefix |directory| to the path where the RLZ data file lives, for tests. void SetRlzStoreDirectory(const FilePath& directory); + +// Returns the path of the plist file used as data store. +std::string RlzPlistFilenameStr(); } // namespace testing #endif // defined(OS_MACOSX) |