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

Side by Side Diff: chrome/browser/extensions/extension_gcm_app_handler_unittest.cc

Issue 398083002: Add "UninstallReason" parameter to ExtensionRegistryObserver::OnExtensionUninstalled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extensions/extension_gcm_app_handler.h" 5 #include "chrome/browser/extensions/extension_gcm_app_handler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 extension_service_->DisableExtension( 327 extension_service_->DisableExtension(
328 extension->id(), Extension::DISABLE_USER_ACTION); 328 extension->id(), Extension::DISABLE_USER_ACTION);
329 } 329 }
330 330
331 void EnableExtension(const Extension* extension) { 331 void EnableExtension(const Extension* extension) {
332 extension_service_->EnableExtension(extension->id()); 332 extension_service_->EnableExtension(extension->id());
333 } 333 }
334 334
335 void UninstallExtension(const Extension* extension) { 335 void UninstallExtension(const Extension* extension) {
336 extension_service_->UninstallExtension( 336 extension_service_->UninstallExtension(
337 extension->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL); 337 extension->id(), UninstalledExtensionInfo::REASON_FOR_TESTING, NULL);
338 } 338 }
339 339
340 void SignIn(const std::string& username) { 340 void SignIn(const std::string& username) {
341 signin_manager_->SignIn(username); 341 signin_manager_->SignIn(username);
342 waiter_.PumpIOLoop(); 342 waiter_.PumpIOLoop();
343 } 343 }
344 344
345 void SignOut() { 345 void SignOut() {
346 signin_manager_->SignOut(signin_metrics::SIGNOUT_TEST); 346 signin_manager_->SignOut(signin_metrics::SIGNOUT_TEST);
347 waiter_.PumpIOLoop(); 347 waiter_.PumpIOLoop();
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 484
485 // App handler is removed when the extension is updated to the version that 485 // App handler is removed when the extension is updated to the version that
486 // has GCM permission removed. 486 // has GCM permission removed.
487 UpdateExtension(extension, "good2.crx"); 487 UpdateExtension(extension, "good2.crx");
488 waiter()->PumpUILoop(); 488 waiter()->PumpUILoop();
489 EXPECT_TRUE(gcm_app_handler()->app_handler_count_drop_to_zero()); 489 EXPECT_TRUE(gcm_app_handler()->app_handler_count_drop_to_zero());
490 EXPECT_FALSE(HasAppHandlers(extension->id())); 490 EXPECT_FALSE(HasAppHandlers(extension->id()));
491 } 491 }
492 492
493 } // namespace extensions 493 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698