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

Unified Diff: chrome/common/media_galleries/pmp_test_helper.h

Issue 23499006: Media Galleries API Picasa: Add file watch to invalidate database data on disk write. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/media_galleries/picasa_types.cc ('k') | chrome/common/media_galleries/pmp_test_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/media_galleries/pmp_test_helper.h
diff --git a/chrome/common/media_galleries/pmp_test_helper.h b/chrome/common/media_galleries/pmp_test_helper.h
index 2de645293fdfa312939266e923e9c98485c0ca49..acb393aba0b9f2e568abe7a2e28b38a55b3b00de 100644
--- a/chrome/common/media_galleries/pmp_test_helper.h
+++ b/chrome/common/media_galleries/pmp_test_helper.h
@@ -9,30 +9,33 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
#include "chrome/common/media_galleries/pmp_constants.h"
-namespace base {
-class FilePath;
-} // namespace base
-
namespace picasa {
class PmpColumnReader;
-// A helper class used for unit tests only
+// A helper class used for tests only
class PmpTestHelper {
public:
+ enum ColumnFileDestination {
+ DATABASE_DIRECTORY,
+ TEMPORARY_DIRECTORY
+ };
+
explicit PmpTestHelper(const std::string& table_name);
- bool Init();
+ bool Init(ColumnFileDestination column_file_destination);
- base::FilePath GetTempDirPath();
+ base::FilePath GetDatabaseDirPath() const;
+ base::FilePath GetTempDirPath() const;
template<class T>
bool WriteColumnFileFromVector(const std::string& column_name,
const PmpFieldType field_type,
- const std::vector<T>& elements_vector);
+ const std::vector<T>& elements_vector) const;
static std::vector<char> MakeHeader(const PmpFieldType field_type,
const uint32 row_count);
@@ -44,7 +47,8 @@ class PmpTestHelper {
private:
std::string table_name_;
- base::ScopedTempDir temp_dir_;
+ base::ScopedTempDir root_dir_;
+ base::FilePath column_file_destination_directory_;
};
} // namespace picasa
« no previous file with comments | « chrome/common/media_galleries/picasa_types.cc ('k') | chrome/common/media_galleries/pmp_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698