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

Side by Side Diff: rlz/lib/rlz_value_store.h

Issue 11226060: RLZ: remove hard-coded Win || Mac conditions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « rlz/lib/rlz_lib.cc ('k') | rlz/rlz.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef RLZ_VALUE_STORE_H_ 5 #ifndef RLZ_VALUE_STORE_H_
6 #define RLZ_VALUE_STORE_H_ 6 #define RLZ_VALUE_STORE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "rlz/lib/rlz_enums.h" 10 #include "rlz/lib/rlz_enums.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 // Returns a RlzValueStore protected by a cross-process lock, or NULL if the 92 // Returns a RlzValueStore protected by a cross-process lock, or NULL if the
93 // lock can't be obtained. The lifetime of the returned object is limited to 93 // lock can't be obtained. The lifetime of the returned object is limited to
94 // the lifetime of this ScopedRlzValueStoreLock object. 94 // the lifetime of this ScopedRlzValueStoreLock object.
95 RlzValueStore* GetStore(); 95 RlzValueStore* GetStore();
96 96
97 private: 97 private:
98 scoped_ptr<RlzValueStore> store_; 98 scoped_ptr<RlzValueStore> store_;
99 #if defined(OS_WIN) 99 #if defined(OS_WIN)
100 LibMutex lock_; 100 LibMutex lock_;
101 #else 101 #elif defined(OS_MACOSX)
102 base::mac::ScopedNSAutoreleasePool autorelease_pool_; 102 base::mac::ScopedNSAutoreleasePool autorelease_pool_;
103 #endif 103 #endif
104 }; 104 };
105 105
106 #if defined(OS_MACOSX) 106 #if defined(OS_MACOSX)
107 namespace testing { 107 namespace testing {
108 // Prefix |directory| to the path where the RLZ data file lives, for tests. 108 // Prefix |directory| to the path where the RLZ data file lives, for tests.
109 void SetRlzStoreDirectory(const FilePath& directory); 109 void SetRlzStoreDirectory(const FilePath& directory);
110 110
111 // Returns the path of the plist file used as data store. 111 // Returns the path of the plist file used as data store.
112 std::string RlzPlistFilenameStr(); 112 std::string RlzPlistFilenameStr();
113 } // namespace testing 113 } // namespace testing
114 #endif // defined(OS_MACOSX) 114 #endif // defined(OS_MACOSX)
115 115
116 116
117 } // namespace rlz_lib 117 } // namespace rlz_lib
118 118
119 #endif // RLZ_VALUE_STORE_H_ 119 #endif // RLZ_VALUE_STORE_H_
OLDNEW
« no previous file with comments | « rlz/lib/rlz_lib.cc ('k') | rlz/rlz.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698