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

Side by Side Diff: chrome/browser/policy/policy_browsertest.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 (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 <algorithm> 5 #include <algorithm>
6 #include <string> 6 #include <string>
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 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 } 699 }
700 return NULL; 700 return NULL;
701 } 701 }
702 702
703 void UninstallExtension(const std::string& id, bool expect_success) { 703 void UninstallExtension(const std::string& id, bool expect_success) {
704 content::WindowedNotificationObserver observer( 704 content::WindowedNotificationObserver observer(
705 expect_success ? chrome::NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED 705 expect_success ? chrome::NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED
706 : chrome::NOTIFICATION_EXTENSION_UNINSTALL_NOT_ALLOWED, 706 : chrome::NOTIFICATION_EXTENSION_UNINSTALL_NOT_ALLOWED,
707 content::NotificationService::AllSources()); 707 content::NotificationService::AllSources());
708 extension_service()->UninstallExtension( 708 extension_service()->UninstallExtension(
709 id, ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL); 709 id, extensions::UninstalledExtensionInfo::REASON_FOR_TESTING, NULL);
710 observer.Wait(); 710 observer.Wait();
711 } 711 }
712 712
713 void UpdateProviderPolicy(const PolicyMap& policy) { 713 void UpdateProviderPolicy(const PolicyMap& policy) {
714 provider_.UpdateChromePolicy(policy); 714 provider_.UpdateChromePolicy(policy);
715 DCHECK(base::MessageLoop::current()); 715 DCHECK(base::MessageLoop::current());
716 base::RunLoop loop; 716 base::RunLoop loop;
717 loop.RunUntilIdle(); 717 loop.RunUntilIdle();
718 } 718 }
719 719
(...skipping 2317 matching lines...) Expand 10 before | Expand all | Expand 10 after
3037 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( 3037 EXPECT_TRUE(content::ExecuteScriptAndExtractBool(
3038 browser2->tab_strip_model()->GetActiveWebContents(), 3038 browser2->tab_strip_model()->GetActiveWebContents(),
3039 "domAutomationController.send(window.showModalDialog !== undefined);", 3039 "domAutomationController.send(window.showModalDialog !== undefined);",
3040 &result)); 3040 &result));
3041 EXPECT_TRUE(result); 3041 EXPECT_TRUE(result);
3042 } 3042 }
3043 3043
3044 #endif // !defined(CHROME_OS) 3044 #endif // !defined(CHROME_OS)
3045 3045
3046 } // namespace policy 3046 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698