Chromium Code Reviews| 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 Profile; | 18 class Profile; |
| 19 | 19 |
| 20 scoped_refptr<extensions::Extension> AddMediaGalleriesApp( | 20 scoped_refptr<extensions::Extension> AddMediaGalleriesApp( |
| 21 const std::string& name, | 21 const std::string& name, |
| 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 TestMediaDirectoriesOverrides { |
|
Lei Zhang
2013/09/20 23:55:28
Is this needed in this CL?
tommycli
2013/09/23 20:39:12
Done. I took it out.
| |
| 26 public: | 26 public: |
| 27 EnsureMediaDirectoriesExists(); | 27 TestMediaDirectoriesOverrides(); |
| 28 ~EnsureMediaDirectoriesExists(); | 28 ~TestMediaDirectoriesOverrides(); |
| 29 | 29 |
| 30 int num_galleries() const { return num_galleries_; } | 30 int num_galleries() const { return num_galleries_; } |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 void Init(); | 33 void Init(); |
| 34 | 34 |
| 35 base::ScopedTempDir fake_dir_; | 35 base::ScopedTempDir fake_dir_; |
| 36 | 36 |
| 37 int num_galleries_; | 37 int num_galleries_; |
| 38 | 38 |
| 39 scoped_ptr<base::ScopedPathOverride> appdir_override_; | 39 scoped_ptr<base::ScopedPathOverride> appdir_override_; |
| 40 scoped_ptr<base::ScopedPathOverride> music_override_; | 40 scoped_ptr<base::ScopedPathOverride> music_override_; |
| 41 scoped_ptr<base::ScopedPathOverride> pictures_override_; | 41 scoped_ptr<base::ScopedPathOverride> pictures_override_; |
| 42 scoped_ptr<base::ScopedPathOverride> video_override_; | 42 scoped_ptr<base::ScopedPathOverride> video_override_; |
| 43 | 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(EnsureMediaDirectoriesExists); | 44 DISALLOW_COPY_AND_ASSIGN(TestMediaDirectoriesOverrides); |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_TEST_UTIL_H_ | 47 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_TEST_UTIL_H_ |
| OLD | NEW |