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/extensions/api/storage/settings_test_util.h" | 5 #include "chrome/browser/extensions/api/storage/settings_test_util.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "chrome/browser/extensions/api/storage/settings_frontend.h" | 8 #include "chrome/browser/extensions/api/storage/settings_frontend.h" |
9 #include "chrome/browser/extensions/extension_system_factory.h" | 9 #include "chrome/browser/extensions/extension_system_factory.h" |
10 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 const std::string& id, | 61 const std::string& id, |
62 Manifest::Type type, | 62 Manifest::Type type, |
63 const std::set<std::string>& permissions_set) { | 63 const std::set<std::string>& permissions_set) { |
64 base::DictionaryValue manifest; | 64 base::DictionaryValue manifest; |
65 manifest.SetString("name", std::string("Test extension ") + id); | 65 manifest.SetString("name", std::string("Test extension ") + id); |
66 manifest.SetString("version", "1.0"); | 66 manifest.SetString("version", "1.0"); |
67 | 67 |
68 scoped_ptr<base::ListValue> permissions(new base::ListValue()); | 68 scoped_ptr<base::ListValue> permissions(new base::ListValue()); |
69 for (std::set<std::string>::const_iterator it = permissions_set.begin(); | 69 for (std::set<std::string>::const_iterator it = permissions_set.begin(); |
70 it != permissions_set.end(); ++it) { | 70 it != permissions_set.end(); ++it) { |
71 permissions->Append(Value::CreateStringValue(*it)); | 71 permissions->Append(new base::StringValue(*it)); |
72 } | 72 } |
73 manifest.Set("permissions", permissions.release()); | 73 manifest.Set("permissions", permissions.release()); |
74 | 74 |
75 switch (type) { | 75 switch (type) { |
76 case Manifest::TYPE_EXTENSION: | 76 case Manifest::TYPE_EXTENSION: |
77 break; | 77 break; |
78 | 78 |
79 case Manifest::TYPE_LEGACY_PACKAGED_APP: { | 79 case Manifest::TYPE_LEGACY_PACKAGED_APP: { |
80 base::DictionaryValue* app = new base::DictionaryValue(); | 80 base::DictionaryValue* app = new base::DictionaryValue(); |
81 base::DictionaryValue* app_launch = new base::DictionaryValue(); | 81 base::DictionaryValue* app_launch = new base::DictionaryValue(); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 ValueStore* ScopedSettingsStorageFactory::Create( | 158 ValueStore* ScopedSettingsStorageFactory::Create( |
159 const base::FilePath& base_path, | 159 const base::FilePath& base_path, |
160 const std::string& extension_id) { | 160 const std::string& extension_id) { |
161 DCHECK(delegate_.get()); | 161 DCHECK(delegate_.get()); |
162 return delegate_->Create(base_path, extension_id); | 162 return delegate_->Create(base_path, extension_id); |
163 } | 163 } |
164 | 164 |
165 } // namespace settings_test_util | 165 } // namespace settings_test_util |
166 | 166 |
167 } // namespace extensions | 167 } // namespace extensions |
OLD | NEW |