Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: chrome/browser/extensions/updater/extension_updater_unittest.cc

Issue 100543005: Update all users of base::Version to explicitly specify the namespace, and clean up the header. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: someday it will work Created 6 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 PendingExtensionInfo::ShouldAllowInstallPredicate should_allow_install = 304 PendingExtensionInfo::ShouldAllowInstallPredicate should_allow_install =
305 (i % 2 == 0) ? &ShouldInstallThemesOnly : &ShouldInstallExtensionsOnly; 305 (i % 2 == 0) ? &ShouldInstallThemesOnly : &ShouldInstallExtensionsOnly;
306 const bool kIsFromSync = true; 306 const bool kIsFromSync = true;
307 const bool kInstallSilently = true; 307 const bool kInstallSilently = true;
308 const bool kMarkAcknowledged = false; 308 const bool kMarkAcknowledged = false;
309 std::string id = id_util::GenerateId(base::StringPrintf("extension%i", i)); 309 std::string id = id_util::GenerateId(base::StringPrintf("extension%i", i));
310 310
311 pending_extension_manager->AddForTesting( 311 pending_extension_manager->AddForTesting(
312 PendingExtensionInfo(id, 312 PendingExtensionInfo(id,
313 update_url, 313 update_url,
314 Version(), 314 base::Version(),
315 should_allow_install, 315 should_allow_install,
316 kIsFromSync, 316 kIsFromSync,
317 kInstallSilently, 317 kInstallSilently,
318 Manifest::INTERNAL, 318 Manifest::INTERNAL,
319 Extension::NO_FLAGS, 319 Extension::NO_FLAGS,
320 kMarkAcknowledged)); 320 kMarkAcknowledged));
321 } 321 }
322 } 322 }
323 323
324 class ServiceForManifestTests : public MockService { 324 class ServiceForManifestTests : public MockService {
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 ResetDownloader( 980 ResetDownloader(
981 &updater, 981 &updater,
982 new ExtensionDownloader(&updater, service->request_context())); 982 new ExtensionDownloader(&updater, service->request_context()));
983 updater.downloader_->extensions_queue_.set_backoff_policy( 983 updater.downloader_->extensions_queue_.set_backoff_policy(
984 &kNoBackoffPolicy); 984 &kNoBackoffPolicy);
985 985
986 GURL test_url("http://localhost/extension.crx"); 986 GURL test_url("http://localhost/extension.crx");
987 987
988 std::string id = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; 988 std::string id = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
989 std::string hash; 989 std::string hash;
990 Version version("0.0.1"); 990 base::Version version("0.0.1");
991 std::set<int> requests; 991 std::set<int> requests;
992 requests.insert(0); 992 requests.insert(0);
993 scoped_ptr<ExtensionDownloader::ExtensionFetch> fetch( 993 scoped_ptr<ExtensionDownloader::ExtensionFetch> fetch(
994 new ExtensionDownloader::ExtensionFetch( 994 new ExtensionDownloader::ExtensionFetch(
995 id, test_url, hash, version.GetString(), requests)); 995 id, test_url, hash, version.GetString(), requests));
996 updater.downloader_->FetchUpdatedExtension(fetch.Pass()); 996 updater.downloader_->FetchUpdatedExtension(fetch.Pass());
997 997
998 if (pending) { 998 if (pending) {
999 const bool kIsFromSync = true; 999 const bool kIsFromSync = true;
1000 const bool kInstallSilently = true; 1000 const bool kInstallSilently = true;
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « chrome/browser/extensions/updater/extension_downloader_delegate.cc ('k') | chrome/browser/extensions/user_script_master.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698