| 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 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| 11 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
| 12 #include "chrome/browser/extensions/extension_prefs.h" | 12 #include "chrome/browser/extensions/extension_prefs.h" |
| 13 #include "chrome/browser/extensions/extension_service.h" | 13 #include "chrome/browser/extensions/extension_service.h" |
| 14 #include "chrome/browser/extensions/extension_system.h" | 14 #include "chrome/browser/extensions/extension_system.h" |
| 15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/common/chrome_paths.h" | 16 #include "chrome/common/chrome_paths.h" |
| 17 #include "chrome/common/extensions/extension.h" | 17 #include "chrome/common/extensions/extension.h" |
| 18 #include "extensions/common/manifest_constants.h" | 18 #include "extensions/common/manifest_constants.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 20 | 20 |
| 21 namespace chrome { | |
| 22 | |
| 23 scoped_refptr<extensions::Extension> AddMediaGalleriesApp( | 21 scoped_refptr<extensions::Extension> AddMediaGalleriesApp( |
| 24 const std::string& name, | 22 const std::string& name, |
| 25 const std::vector<std::string>& media_galleries_permissions, | 23 const std::vector<std::string>& media_galleries_permissions, |
| 26 Profile* profile) { | 24 Profile* profile) { |
| 27 scoped_ptr<DictionaryValue> manifest(new DictionaryValue); | 25 scoped_ptr<DictionaryValue> manifest(new DictionaryValue); |
| 28 manifest->SetString(extensions::manifest_keys::kName, name); | 26 manifest->SetString(extensions::manifest_keys::kName, name); |
| 29 manifest->SetString(extensions::manifest_keys::kVersion, "0.1"); | 27 manifest->SetString(extensions::manifest_keys::kVersion, "0.1"); |
| 30 manifest->SetInteger(extensions::manifest_keys::kManifestVersion, 2); | 28 manifest->SetInteger(extensions::manifest_keys::kManifestVersion, 2); |
| 31 ListValue* background_script_list = new ListValue; | 29 ListValue* background_script_list = new ListValue; |
| 32 background_script_list->Append(Value::CreateStringValue("background.js")); | 30 background_script_list->Append(Value::CreateStringValue("background.js")); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 91 |
| 94 music_override_.reset(new base::ScopedPathOverride( | 92 music_override_.reset(new base::ScopedPathOverride( |
| 95 chrome::DIR_USER_MUSIC, fake_dir_.path().AppendASCII("music"))); | 93 chrome::DIR_USER_MUSIC, fake_dir_.path().AppendASCII("music"))); |
| 96 pictures_override_.reset(new base::ScopedPathOverride( | 94 pictures_override_.reset(new base::ScopedPathOverride( |
| 97 chrome::DIR_USER_PICTURES, fake_dir_.path().AppendASCII("pictures"))); | 95 chrome::DIR_USER_PICTURES, fake_dir_.path().AppendASCII("pictures"))); |
| 98 video_override_.reset(new base::ScopedPathOverride( | 96 video_override_.reset(new base::ScopedPathOverride( |
| 99 chrome::DIR_USER_VIDEOS, fake_dir_.path().AppendASCII("videos"))); | 97 chrome::DIR_USER_VIDEOS, fake_dir_.path().AppendASCII("videos"))); |
| 100 num_galleries_ = 3; | 98 num_galleries_ = 3; |
| 101 #endif | 99 #endif |
| 102 } | 100 } |
| 103 | |
| 104 } // namespace chrome | |
| OLD | NEW |