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/command_line.h" |
10 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
11 #include "base/file_util.h" | 12 #include "base/file_util.h" |
12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
14 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
15 #include "base/string_number_conversions.h" | 16 #include "base/string_number_conversions.h" |
16 #include "base/string_split.h" | 17 #include "base/string_split.h" |
17 #include "base/string_util.h" | 18 #include "base/string_util.h" |
18 #include "base/stringprintf.h" | 19 #include "base/stringprintf.h" |
19 #include "base/threading/thread.h" | 20 #include "base/threading/thread.h" |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 }; | 304 }; |
304 | 305 |
305 class ServiceForDownloadTests : public MockService { | 306 class ServiceForDownloadTests : public MockService { |
306 public: | 307 public: |
307 ServiceForDownloadTests() | 308 ServiceForDownloadTests() |
308 : MockService() { | 309 : MockService() { |
309 } | 310 } |
310 | 311 |
311 // Add a fake crx installer to be returned by a call to UpdateExtension() | 312 // Add a fake crx installer to be returned by a call to UpdateExtension() |
312 // with a specific ID. Caller keeps ownership of |crx_installer|. | 313 // with a specific ID. Caller keeps ownership of |crx_installer|. |
313 void AddFakeCrxInstaller(std::string& id, | 314 void AddFakeCrxInstaller(const std::string& id, CrxInstaller* crx_installer) { |
314 CrxInstaller* crx_installer) { | |
315 fake_crx_installers_[id] = crx_installer; | 315 fake_crx_installers_[id] = crx_installer; |
316 } | 316 } |
317 | 317 |
318 bool UpdateExtension( | 318 bool UpdateExtension( |
319 const std::string& id, | 319 const std::string& id, |
320 const FilePath& extension_path, | 320 const FilePath& extension_path, |
321 const GURL& download_url, | 321 const GURL& download_url, |
322 CrxInstaller** out_crx_installer) OVERRIDE { | 322 CrxInstaller** out_crx_installer) OVERRIDE { |
323 extension_id_ = id; | 323 extension_id_ = id; |
324 install_path_ = extension_path; | 324 install_path_ = extension_path; |
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1504 // -prodversionmin (shouldn't update if browser version too old) | 1504 // -prodversionmin (shouldn't update if browser version too old) |
1505 // -manifests & updates arriving out of order / interleaved | 1505 // -manifests & updates arriving out of order / interleaved |
1506 // -malformed update url (empty, file://, has query, has a # fragment, etc.) | 1506 // -malformed update url (empty, file://, has query, has a # fragment, etc.) |
1507 // -An extension gets uninstalled while updates are in progress (so it doesn't | 1507 // -An extension gets uninstalled while updates are in progress (so it doesn't |
1508 // "come back from the dead") | 1508 // "come back from the dead") |
1509 // -An extension gets manually updated to v3 while we're downloading v2 (ie | 1509 // -An extension gets manually updated to v3 while we're downloading v2 (ie |
1510 // you don't get downgraded accidentally) | 1510 // you don't get downgraded accidentally) |
1511 // -An update manifest mentions multiple updates | 1511 // -An update manifest mentions multiple updates |
1512 | 1512 |
1513 } // namespace extensions | 1513 } // namespace extensions |
OLD | NEW |