| 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/sync/test/integration/sync_extension_helper.h" | 5 #include "chrome/browser/sync/test/integration/sync_extension_helper.h" |
| 6 | 6 |
| 7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 source.SetString(extension_manifest_keys::kPublicKey, public_key); | 270 source.SetString(extension_manifest_keys::kPublicKey, public_key); |
| 271 source.SetString(extension_manifest_keys::kVersion, "0.0.0.0"); | 271 source.SetString(extension_manifest_keys::kVersion, "0.0.0.0"); |
| 272 switch (type) { | 272 switch (type) { |
| 273 case Extension::TYPE_EXTENSION: | 273 case Extension::TYPE_EXTENSION: |
| 274 // Do nothing. | 274 // Do nothing. |
| 275 break; | 275 break; |
| 276 case Extension::TYPE_THEME: | 276 case Extension::TYPE_THEME: |
| 277 source.Set(extension_manifest_keys::kTheme, new DictionaryValue()); | 277 source.Set(extension_manifest_keys::kTheme, new DictionaryValue()); |
| 278 break; | 278 break; |
| 279 case Extension::TYPE_HOSTED_APP: | 279 case Extension::TYPE_HOSTED_APP: |
| 280 case Extension::TYPE_PACKAGED_APP: | 280 case Extension::TYPE_LEGACY_PACKAGED_APP: |
| 281 source.Set(extension_manifest_keys::kApp, new DictionaryValue()); | 281 source.Set(extension_manifest_keys::kApp, new DictionaryValue()); |
| 282 source.SetString(extension_manifest_keys::kLaunchWebURL, | 282 source.SetString(extension_manifest_keys::kLaunchWebURL, |
| 283 "http://www.example.com"); | 283 "http://www.example.com"); |
| 284 break; | 284 break; |
| 285 default: | 285 default: |
| 286 ADD_FAILURE(); | 286 ADD_FAILURE(); |
| 287 return NULL; | 287 return NULL; |
| 288 } | 288 } |
| 289 const FilePath sub_dir = FilePath().AppendASCII(name); | 289 const FilePath sub_dir = FilePath().AppendASCII(name); |
| 290 FilePath extension_dir; | 290 FilePath extension_dir; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 if (extension->id() != expected_id) { | 348 if (extension->id() != expected_id) { |
| 349 EXPECT_EQ(expected_id, extension->id()); | 349 EXPECT_EQ(expected_id, extension->id()); |
| 350 return NULL; | 350 return NULL; |
| 351 } | 351 } |
| 352 DVLOG(2) << "created extension with name = " | 352 DVLOG(2) << "created extension with name = " |
| 353 << name << ", id = " << expected_id; | 353 << name << ", id = " << expected_id; |
| 354 (it->second)[name] = extension; | 354 (it->second)[name] = extension; |
| 355 id_to_name_[expected_id] = name; | 355 id_to_name_[expected_id] = name; |
| 356 return extension; | 356 return extension; |
| 357 } | 357 } |
| OLD | NEW |