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

Side by Side Diff: chrome/browser/media_galleries/media_galleries_test_util.h

Issue 17389007: [MediaGalleries] Mock the app data dir on Windows/Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Non-virtual dtor Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/media_galleries/media_galleries_test_util.cc » ('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 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"
12 #include "base/test/scoped_path_override.h"
11 13
12 namespace extensions { 14 namespace extensions {
13 class Extension; 15 class Extension;
14 } 16 }
15 17
16 class Profile; 18 class Profile;
17 19
18 namespace chrome { 20 namespace chrome {
19 21
20 scoped_refptr<extensions::Extension> AddMediaGalleriesApp( 22 scoped_refptr<extensions::Extension> AddMediaGalleriesApp(
21 const std::string& name, 23 const std::string& name,
22 const std::vector<std::string>& media_galleries_permissions, 24 const std::vector<std::string>& media_galleries_permissions,
23 Profile* profile); 25 Profile* profile);
24 26
25 class EnsureMediaDirectoriesExists { 27 class EnsureMediaDirectoriesExists {
26 public: 28 public:
27 EnsureMediaDirectoriesExists(); 29 EnsureMediaDirectoriesExists();
30 ~EnsureMediaDirectoriesExists();
28 31
29 int num_galleries() const { return num_galleries_; } 32 int num_galleries() const { return num_galleries_; }
30 33
31 private: 34 private:
32 void Init(); 35 void Init();
33 36
34 base::ScopedTempDir fake_dir_; 37 base::ScopedTempDir fake_dir_;
35 38
36 int num_galleries_; 39 int num_galleries_;
37 40
41 scoped_ptr<base::ScopedPathOverride> appdir_override_;
42 scoped_ptr<base::ScopedPathOverride> music_override_;
43 scoped_ptr<base::ScopedPathOverride> pictures_override_;
44 scoped_ptr<base::ScopedPathOverride> video_override_;
45
38 DISALLOW_COPY_AND_ASSIGN(EnsureMediaDirectoriesExists); 46 DISALLOW_COPY_AND_ASSIGN(EnsureMediaDirectoriesExists);
39 }; 47 };
40 48
41 } // namespace chrome 49 } // namespace chrome
42 50
43 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_TEST_UTIL_H_ 51 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/media_galleries/media_galleries_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698