| 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 <list> | 5 #include <list> |
| 6 #include <map> | 6 #include <map> |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 | 252 |
| 253 // Creates test extensions and inserts them into list. The name and | 253 // Creates test extensions and inserts them into list. The name and |
| 254 // version are all based on their index. If |update_url| is non-null, it | 254 // version are all based on their index. If |update_url| is non-null, it |
| 255 // will be used as the update_url for each extension. | 255 // will be used as the update_url for each extension. |
| 256 // The |id| is used to distinguish extension names and make sure that | 256 // The |id| is used to distinguish extension names and make sure that |
| 257 // no two extensions share the same name. | 257 // no two extensions share the same name. |
| 258 void CreateTestExtensions(int id, int count, ExtensionList *list, | 258 void CreateTestExtensions(int id, int count, ExtensionList *list, |
| 259 const std::string* update_url, | 259 const std::string* update_url, |
| 260 Manifest::Location location) { | 260 Manifest::Location location) { |
| 261 for (int i = 1; i <= count; i++) { | 261 for (int i = 1; i <= count; i++) { |
| 262 DictionaryValue manifest; | 262 base::DictionaryValue manifest; |
| 263 manifest.SetString(manifest_keys::kVersion, | 263 manifest.SetString(manifest_keys::kVersion, |
| 264 base::StringPrintf("%d.0.0.0", i)); | 264 base::StringPrintf("%d.0.0.0", i)); |
| 265 manifest.SetString(manifest_keys::kName, | 265 manifest.SetString(manifest_keys::kName, |
| 266 base::StringPrintf("Extension %d.%d", id, i)); | 266 base::StringPrintf("Extension %d.%d", id, i)); |
| 267 if (update_url) | 267 if (update_url) |
| 268 manifest.SetString(manifest_keys::kUpdateURL, *update_url); | 268 manifest.SetString(manifest_keys::kUpdateURL, *update_url); |
| 269 scoped_refptr<Extension> e = | 269 scoped_refptr<Extension> e = |
| 270 prefs_->AddExtensionWithManifest(manifest, location); | 270 prefs_->AddExtensionWithManifest(manifest, location); |
| 271 ASSERT_TRUE(e.get() != NULL); | 271 ASSERT_TRUE(e.get() != NULL); |
| 272 list->push_back(e); | 272 list->push_back(e); |
| (...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1639 // -prodversionmin (shouldn't update if browser version too old) | 1639 // -prodversionmin (shouldn't update if browser version too old) |
| 1640 // -manifests & updates arriving out of order / interleaved | 1640 // -manifests & updates arriving out of order / interleaved |
| 1641 // -malformed update url (empty, file://, has query, has a # fragment, etc.) | 1641 // -malformed update url (empty, file://, has query, has a # fragment, etc.) |
| 1642 // -An extension gets uninstalled while updates are in progress (so it doesn't | 1642 // -An extension gets uninstalled while updates are in progress (so it doesn't |
| 1643 // "come back from the dead") | 1643 // "come back from the dead") |
| 1644 // -An extension gets manually updated to v3 while we're downloading v2 (ie | 1644 // -An extension gets manually updated to v3 while we're downloading v2 (ie |
| 1645 // you don't get downgraded accidentally) | 1645 // you don't get downgraded accidentally) |
| 1646 // -An update manifest mentions multiple updates | 1646 // -An update manifest mentions multiple updates |
| 1647 | 1647 |
| 1648 } // namespace extensions | 1648 } // namespace extensions |
| OLD | NEW |