| 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" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/test/scoped_path_override.h" | 12 #include "base/test/scoped_path_override.h" |
| 13 | 13 |
| 14 namespace extensions { | 14 namespace extensions { |
| 15 class Extension; | 15 class Extension; |
| 16 } | 16 } |
| 17 | 17 |
| 18 class MockPreferences; |
| 18 class Profile; | 19 class Profile; |
| 19 | 20 |
| 20 namespace chrome { | 21 namespace chrome { |
| 21 | 22 |
| 22 scoped_refptr<extensions::Extension> AddMediaGalleriesApp( | 23 scoped_refptr<extensions::Extension> AddMediaGalleriesApp( |
| 23 const std::string& name, | 24 const std::string& name, |
| 24 const std::vector<std::string>& media_galleries_permissions, | 25 const std::vector<std::string>& media_galleries_permissions, |
| 25 Profile* profile); | 26 Profile* profile); |
| 26 | 27 |
| 27 class EnsureMediaDirectoriesExists { | 28 class EnsureMediaDirectoriesExists { |
| 28 public: | 29 public: |
| 29 EnsureMediaDirectoriesExists(); | 30 EnsureMediaDirectoriesExists(); |
| 30 ~EnsureMediaDirectoriesExists(); | 31 ~EnsureMediaDirectoriesExists(); |
| 31 | 32 |
| 32 int num_galleries() const { return num_galleries_; } | 33 int num_galleries() const { return num_galleries_; } |
| 33 | 34 |
| 34 private: | 35 private: |
| 35 void Init(); | 36 void Init(); |
| 36 | 37 |
| 37 base::ScopedTempDir fake_dir_; | 38 base::ScopedTempDir fake_dir_; |
| 38 | 39 |
| 39 int num_galleries_; | 40 int num_galleries_; |
| 40 | 41 |
| 41 scoped_ptr<base::ScopedPathOverride> appdir_override_; | 42 scoped_ptr<base::ScopedPathOverride> appdir_override_; |
| 42 scoped_ptr<base::ScopedPathOverride> music_override_; | 43 scoped_ptr<base::ScopedPathOverride> music_override_; |
| 43 scoped_ptr<base::ScopedPathOverride> pictures_override_; | 44 scoped_ptr<base::ScopedPathOverride> pictures_override_; |
| 44 scoped_ptr<base::ScopedPathOverride> video_override_; | 45 scoped_ptr<base::ScopedPathOverride> video_override_; |
| 45 | 46 |
| 47 #if defined(OS_MACOSX) |
| 48 scoped_ptr<MockPreferences> mac_preferences_; |
| 49 #endif |
| 50 |
| 46 DISALLOW_COPY_AND_ASSIGN(EnsureMediaDirectoriesExists); | 51 DISALLOW_COPY_AND_ASSIGN(EnsureMediaDirectoriesExists); |
| 47 }; | 52 }; |
| 48 | 53 |
| 49 } // namespace chrome | 54 } // namespace chrome |
| 50 | 55 |
| 51 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_TEST_UTIL_H_ | 56 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_TEST_UTIL_H_ |
| OLD | NEW |