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

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

Issue 11246003: Remove Profile->GetExtensionProcessManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix lazy apitest Created 8 years, 2 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 "base/process_util.h" 5 #include "base/process_util.h"
6 #include "chrome/browser/browser_process.h" 6 #include "chrome/browser/browser_process.h"
7 #include "chrome/browser/extensions/extension_browsertest.h" 7 #include "chrome/browser/extensions/extension_browsertest.h"
8 #include "chrome/browser/extensions/extension_host.h" 8 #include "chrome/browser/extensions/extension_host.h"
9 #include "chrome/browser/extensions/extension_process_manager.h" 9 #include "chrome/browser/extensions/extension_process_manager.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
Yoyo Zhou 2012/10/23 00:20:06 probably needs extension_system.h to be included h
Miranda Callahan 2012/10/23 11:04:43 Done.
11 #include "chrome/browser/notifications/balloon.h" 11 #include "chrome/browser/notifications/balloon.h"
12 #include "chrome/browser/notifications/balloon_collection.h" 12 #include "chrome/browser/notifications/balloon_collection.h"
13 #include "chrome/browser/notifications/balloon_host.h" 13 #include "chrome/browser/notifications/balloon_host.h"
14 #include "chrome/browser/notifications/notification.h" 14 #include "chrome/browser/notifications/notification.h"
15 #include "chrome/browser/notifications/notification_delegate.h" 15 #include "chrome/browser/notifications/notification_delegate.h"
16 #include "chrome/browser/notifications/notification_ui_manager.h" 16 #include "chrome/browser/notifications/notification_ui_manager.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/ui/browser.h" 18 #include "chrome/browser/ui/browser.h"
19 #include "chrome/browser/ui/browser_commands.h" 19 #include "chrome/browser/ui/browser_commands.h"
20 #include "chrome/browser/ui/browser_tabstrip.h" 20 #include "chrome/browser/ui/browser_tabstrip.h"
(...skipping 10 matching lines...) Expand all
31 using content::WebContents; 31 using content::WebContents;
32 using extensions::Extension; 32 using extensions::Extension;
33 33
34 class ExtensionCrashRecoveryTest : public ExtensionBrowserTest { 34 class ExtensionCrashRecoveryTest : public ExtensionBrowserTest {
35 protected: 35 protected:
36 ExtensionService* GetExtensionService() { 36 ExtensionService* GetExtensionService() {
37 return browser()->profile()->GetExtensionService(); 37 return browser()->profile()->GetExtensionService();
38 } 38 }
39 39
40 ExtensionProcessManager* GetExtensionProcessManager() { 40 ExtensionProcessManager* GetExtensionProcessManager() {
41 return browser()->profile()->GetExtensionProcessManager(); 41 return extensions::ExtensionSystem::Get(browser()->profile())->
42 process_manager();
42 } 43 }
43 44
44 Balloon* GetNotificationDelegate(size_t index) { 45 Balloon* GetNotificationDelegate(size_t index) {
45 NotificationUIManager* manager = 46 NotificationUIManager* manager =
46 g_browser_process->notification_ui_manager(); 47 g_browser_process->notification_ui_manager();
47 BalloonCollection::Balloons balloons = 48 BalloonCollection::Balloons balloons =
48 manager->balloon_collection()->GetActiveBalloons(); 49 manager->balloon_collection()->GetActiveBalloons();
49 return balloons.at(index); 50 return balloons.at(index);
50 } 51 }
51 52
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 &chrome::GetActiveWebContents(browser())->GetController())); 488 &chrome::GetActiveWebContents(browser())->GetController()));
488 chrome::Reload(browser(), CURRENT_TAB); 489 chrome::Reload(browser(), CURRENT_TAB);
489 observer.Wait(); 490 observer.Wait();
490 } 491 }
491 // Extension should now be loaded. 492 // Extension should now be loaded.
492 SCOPED_TRACE("after reloading the tab"); 493 SCOPED_TRACE("after reloading the tab");
493 CheckExtensionConsistency(first_extension_id_); 494 CheckExtensionConsistency(first_extension_id_);
494 ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size()); 495 ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size());
495 ASSERT_EQ(0U, CountBalloons()); 496 ASSERT_EQ(0U, CountBalloons());
496 } 497 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698