| OLD | NEW |
| 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 CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_TEST_UTIL_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_TEST_UTIL_H_ |
| 6 #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_TEST_UTIL_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_TEST_UTIL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 const std::vector<std::string>& media_galleries_permissions, | 22 const std::vector<std::string>& media_galleries_permissions, |
| 23 Profile* profile); | 23 Profile* profile); |
| 24 | 24 |
| 25 class EnsureMediaDirectoriesExists { | 25 class EnsureMediaDirectoriesExists { |
| 26 public: | 26 public: |
| 27 EnsureMediaDirectoriesExists(); | 27 EnsureMediaDirectoriesExists(); |
| 28 ~EnsureMediaDirectoriesExists(); | 28 ~EnsureMediaDirectoriesExists(); |
| 29 | 29 |
| 30 int num_galleries() const { return num_galleries_; } | 30 int num_galleries() const { return num_galleries_; } |
| 31 | 31 |
| 32 const base::FilePath& GetFakeAppDataPath() const; |
| 33 #if defined(OS_WIN) |
| 34 const base::FilePath& GetFakeLocalAppDataPath() const; |
| 35 #endif |
| 36 |
| 32 private: | 37 private: |
| 33 void Init(); | 38 void Init(); |
| 34 | 39 |
| 35 base::ScopedTempDir fake_dir_; | 40 base::ScopedTempDir fake_dir_; |
| 36 | 41 |
| 37 int num_galleries_; | 42 int num_galleries_; |
| 38 | 43 |
| 39 scoped_ptr<base::ScopedPathOverride> appdir_override_; | 44 scoped_ptr<base::ScopedPathOverride> app_data_override_; |
| 40 scoped_ptr<base::ScopedPathOverride> music_override_; | 45 scoped_ptr<base::ScopedPathOverride> music_override_; |
| 41 scoped_ptr<base::ScopedPathOverride> pictures_override_; | 46 scoped_ptr<base::ScopedPathOverride> pictures_override_; |
| 42 scoped_ptr<base::ScopedPathOverride> video_override_; | 47 scoped_ptr<base::ScopedPathOverride> video_override_; |
| 48 #if defined(OS_WIN) |
| 49 scoped_ptr<base::ScopedPathOverride> local_app_data_override_; |
| 50 #endif |
| 43 | 51 |
| 44 DISALLOW_COPY_AND_ASSIGN(EnsureMediaDirectoriesExists); | 52 DISALLOW_COPY_AND_ASSIGN(EnsureMediaDirectoriesExists); |
| 45 }; | 53 }; |
| 46 | 54 |
| 47 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_TEST_UTIL_H_ | 55 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_TEST_UTIL_H_ |
| OLD | NEW |