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 #include "chrome/browser/media_galleries/media_galleries_test_util.h" | 5 #include "chrome/browser/media_galleries/media_galleries_test_util.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #include <stddef.h> |
8 #include <windows.h> | |
9 #endif | |
10 | 8 |
11 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
12 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
13 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
14 #include "base/path_service.h" | 12 #include "base/path_service.h" |
15 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
16 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
| 15 #include "build/build_config.h" |
17 #include "chrome/browser/extensions/extension_service.h" | 16 #include "chrome/browser/extensions/extension_service.h" |
18 #include "chrome/browser/media_galleries/fileapi/picasa_finder.h" | 17 #include "chrome/browser/media_galleries/fileapi/picasa_finder.h" |
19 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
20 #include "chrome/common/chrome_paths.h" | 19 #include "chrome/common/chrome_paths.h" |
21 #include "components/crx_file/id_util.h" | 20 #include "components/crx_file/id_util.h" |
22 #include "extensions/browser/extension_prefs.h" | 21 #include "extensions/browser/extension_prefs.h" |
23 #include "extensions/browser/extension_system.h" | 22 #include "extensions/browser/extension_system.h" |
24 #include "extensions/common/manifest_constants.h" | 23 #include "extensions/common/manifest_constants.h" |
25 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
26 | 25 |
27 #if defined(OS_MACOSX) | 26 #if defined(OS_MACOSX) |
28 #include "base/mac/foundation_util.h" | 27 #include "base/mac/foundation_util.h" |
29 #include "base/strings/sys_string_conversions.h" | 28 #include "base/strings/sys_string_conversions.h" |
30 #include "chrome/browser/media_galleries/fileapi/iapps_finder_impl.h" | 29 #include "chrome/browser/media_galleries/fileapi/iapps_finder_impl.h" |
31 #include "components/policy/core/common/preferences_mock_mac.h" | 30 #include "components/policy/core/common/preferences_mock_mac.h" |
32 #endif // OS_MACOSX | 31 #endif // OS_MACOSX |
33 | 32 |
34 #if defined(OS_WIN) | 33 #if defined(OS_WIN) |
| 34 #include <windows.h> |
35 #include "base/test/test_reg_util_win.h" | 35 #include "base/test/test_reg_util_win.h" |
36 #include "base/win/registry.h" | 36 #include "base/win/registry.h" |
37 #endif // OS_WIN | 37 #endif // OS_WIN |
38 | 38 |
39 scoped_refptr<extensions::Extension> AddMediaGalleriesApp( | 39 scoped_refptr<extensions::Extension> AddMediaGalleriesApp( |
40 const std::string& name, | 40 const std::string& name, |
41 const std::vector<std::string>& media_galleries_permissions, | 41 const std::vector<std::string>& media_galleries_permissions, |
42 Profile* profile) { | 42 Profile* profile) { |
43 scoped_ptr<base::DictionaryValue> manifest(new base::DictionaryValue); | 43 scoped_ptr<base::DictionaryValue> manifest(new base::DictionaryValue); |
44 manifest->SetString(extensions::manifest_keys::kName, name); | 44 manifest->SetString(extensions::manifest_keys::kName, name); |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 | 230 |
231 base::FilePath MakeMediaGalleriesTestingPath(const std::string& dir) { | 231 base::FilePath MakeMediaGalleriesTestingPath(const std::string& dir) { |
232 #if defined(OS_WIN) | 232 #if defined(OS_WIN) |
233 return base::FilePath(FILE_PATH_LITERAL("C:\\")).AppendASCII(dir); | 233 return base::FilePath(FILE_PATH_LITERAL("C:\\")).AppendASCII(dir); |
234 #elif defined(OS_POSIX) | 234 #elif defined(OS_POSIX) |
235 return base::FilePath(FILE_PATH_LITERAL("/")).Append(dir); | 235 return base::FilePath(FILE_PATH_LITERAL("/")).Append(dir); |
236 #else | 236 #else |
237 NOTREACHED(); | 237 NOTREACHED(); |
238 #endif | 238 #endif |
239 } | 239 } |
OLD | NEW |