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

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

Issue 23456035: Media Galleries API Picasa: Windows Custom Database Locations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
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" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/test/scoped_path_override.h" 12 #include "base/test/scoped_path_override.h"
13 #include "base/test/test_reg_util_win.h"
13 14
14 namespace extensions { 15 namespace extensions {
15 class Extension; 16 class Extension;
16 } 17 }
17 18
19 namespace registry_util {
20 class RegistryOverrideManager;
21 }
22
18 class Profile; 23 class Profile;
19 24
20 scoped_refptr<extensions::Extension> AddMediaGalleriesApp( 25 scoped_refptr<extensions::Extension> AddMediaGalleriesApp(
21 const std::string& name, 26 const std::string& name,
22 const std::vector<std::string>& media_galleries_permissions, 27 const std::vector<std::string>& media_galleries_permissions,
23 Profile* profile); 28 Profile* profile);
24 29
25 class EnsureMediaDirectoriesExists { 30 class EnsureMediaDirectoriesExists {
26 public: 31 public:
27 EnsureMediaDirectoriesExists(); 32 EnsureMediaDirectoriesExists();
28 ~EnsureMediaDirectoriesExists(); 33 ~EnsureMediaDirectoriesExists();
29 34
30 int num_galleries() const { return num_galleries_; } 35 int num_galleries() const { return num_galleries_; }
31 36
32 base::FilePath GetFakeAppDataPath() const; 37 base::FilePath GetFakeAppDataPath() const;
33 #if defined(OS_WIN) 38 #if defined(OS_WIN)
34 base::FilePath GetFakeLocalAppDataPath() const; 39 base::FilePath GetFakeLocalAppDataPath() const;
40 void WriteCustomPicasaAppDataPathToRegistry(const base::FilePath& path);
35 #endif 41 #endif
36 #if defined(OS_WIN) || defined(OS_MACOSX) 42 #if defined(OS_WIN) || defined(OS_MACOSX)
37 base::FilePath GetFakePicasaFoldersRootPath() const; 43 base::FilePath GetFakePicasaFoldersRootPath() const;
38 #endif 44 #endif
39 45
40 private: 46 private:
41 void Init(); 47 void Init();
42 48
43 base::ScopedTempDir fake_dir_; 49 base::ScopedTempDir fake_dir_;
44 50
45 int num_galleries_; 51 int num_galleries_;
46 52
47 scoped_ptr<base::ScopedPathOverride> app_data_override_; 53 scoped_ptr<base::ScopedPathOverride> app_data_override_;
48 scoped_ptr<base::ScopedPathOverride> music_override_; 54 scoped_ptr<base::ScopedPathOverride> music_override_;
49 scoped_ptr<base::ScopedPathOverride> pictures_override_; 55 scoped_ptr<base::ScopedPathOverride> pictures_override_;
50 scoped_ptr<base::ScopedPathOverride> video_override_; 56 scoped_ptr<base::ScopedPathOverride> video_override_;
51 #if defined(OS_WIN) 57 #if defined(OS_WIN)
52 scoped_ptr<base::ScopedPathOverride> local_app_data_override_; 58 scoped_ptr<base::ScopedPathOverride> local_app_data_override_;
59
60 registry_util::RegistryOverrideManager registry_override_;
53 #endif 61 #endif
54 62
55 DISALLOW_COPY_AND_ASSIGN(EnsureMediaDirectoriesExists); 63 DISALLOW_COPY_AND_ASSIGN(EnsureMediaDirectoriesExists);
56 }; 64 };
57 65
58 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_TEST_UTIL_H_ 66 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698