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

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

Issue 1143323005: Refactor AO2TS to make it easier to componentize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address roger's comments Created 5 years, 6 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
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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 return downloader.Pass(); 380 return downloader.Pass();
381 } 381 }
382 382
383 scoped_ptr<ExtensionDownloader> CreateExtensionDownloaderWithIdentity( 383 scoped_ptr<ExtensionDownloader> CreateExtensionDownloaderWithIdentity(
384 ExtensionDownloaderDelegate* delegate) { 384 ExtensionDownloaderDelegate* delegate) {
385 scoped_ptr<FakeIdentityProvider> fake_identity_provider; 385 scoped_ptr<FakeIdentityProvider> fake_identity_provider;
386 fake_token_service_.reset(new FakeOAuth2TokenService()); 386 fake_token_service_.reset(new FakeOAuth2TokenService());
387 fake_identity_provider.reset(new FakeIdentityProvider( 387 fake_identity_provider.reset(new FakeIdentityProvider(
388 fake_token_service_.get())); 388 fake_token_service_.get()));
389 fake_identity_provider->LogIn(kFakeAccountId); 389 fake_identity_provider->LogIn(kFakeAccountId);
390 fake_token_service_->AddAccount(kFakeAccountId); 390 fake_token_service_->GetDelegate()->UpdateCredentials(kFakeAccountId,
391 "refresh_token");
391 392
392 scoped_ptr<ExtensionDownloader> downloader( 393 scoped_ptr<ExtensionDownloader> downloader(
393 CreateExtensionDownloader(delegate)); 394 CreateExtensionDownloader(delegate));
394 downloader->SetWebstoreIdentityProvider(fake_identity_provider.Pass()); 395 downloader->SetWebstoreIdentityProvider(fake_identity_provider.Pass());
395 return downloader.Pass(); 396 return downloader.Pass();
396 } 397 }
397 398
398 scoped_ptr<FakeOAuth2TokenService> fake_token_service_; 399 scoped_ptr<FakeOAuth2TokenService> fake_token_service_;
399 400
400 ExtensionDownloaderDelegate* downloader_delegate_override_; 401 ExtensionDownloaderDelegate* downloader_delegate_override_;
(...skipping 1850 matching lines...) Expand 10 before | Expand all | Expand 10 after
2251 // -prodversionmin (shouldn't update if browser version too old) 2252 // -prodversionmin (shouldn't update if browser version too old)
2252 // -manifests & updates arriving out of order / interleaved 2253 // -manifests & updates arriving out of order / interleaved
2253 // -malformed update url (empty, file://, has query, has a # fragment, etc.) 2254 // -malformed update url (empty, file://, has query, has a # fragment, etc.)
2254 // -An extension gets uninstalled while updates are in progress (so it doesn't 2255 // -An extension gets uninstalled while updates are in progress (so it doesn't
2255 // "come back from the dead") 2256 // "come back from the dead")
2256 // -An extension gets manually updated to v3 while we're downloading v2 (ie 2257 // -An extension gets manually updated to v3 while we're downloading v2 (ie
2257 // you don't get downgraded accidentally) 2258 // you don't get downgraded accidentally)
2258 // -An update manifest mentions multiple updates 2259 // -An update manifest mentions multiple updates
2259 2260
2260 } // namespace extensions 2261 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698