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

Side by Side Diff: chrome/browser/debugger/devtools_sanity_browsertest.cc

Issue 11246003: Remove Profile->GetExtensionProcessManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix extension_crash_recovery_browsertest 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/bind.h" 5 #include "base/bind.h"
6 #include "base/cancelable_callback.h" 6 #include "base/cancelable_callback.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "base/stringprintf.h" 11 #include "base/stringprintf.h"
12 #include "base/test/test_timeouts.h" 12 #include "base/test/test_timeouts.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "chrome/browser/debugger/devtools_window.h" 14 #include "chrome/browser/debugger/devtools_window.h"
15 #include "chrome/browser/extensions/extension_service.h" 15 #include "chrome/browser/extensions/extension_service.h"
16 #include "chrome/browser/extensions/extension_system.h"
16 #include "chrome/browser/extensions/unpacked_installer.h" 17 #include "chrome/browser/extensions/unpacked_installer.h"
17 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/ui/browser.h" 19 #include "chrome/browser/ui/browser.h"
19 #include "chrome/browser/ui/browser_commands.h" 20 #include "chrome/browser/ui/browser_commands.h"
20 #include "chrome/browser/ui/browser_tabstrip.h" 21 #include "chrome/browser/ui/browser_tabstrip.h"
21 #include "chrome/browser/ui/tab_contents/tab_contents.h" 22 #include "chrome/browser/ui/tab_contents/tab_contents.h"
22 #include "chrome/common/chrome_notification_types.h" 23 #include "chrome/common/chrome_notification_types.h"
23 #include "chrome/common/chrome_paths.h" 24 #include "chrome/common/chrome_paths.h"
24 #include "chrome/common/chrome_switches.h" 25 #include "chrome/common/chrome_switches.h"
25 #include "chrome/test/base/in_process_browser_test.h" 26 #include "chrome/test/base/in_process_browser_test.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 222
222 content::NotificationRegistrar registrar; 223 content::NotificationRegistrar registrar;
223 registrar.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING, 224 registrar.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
224 content::NotificationService::AllSources()); 225 content::NotificationService::AllSources());
225 base::CancelableClosure timeout( 226 base::CancelableClosure timeout(
226 base::Bind(&TimeoutCallback, "Extension host load timed out.")); 227 base::Bind(&TimeoutCallback, "Extension host load timed out."));
227 MessageLoop::current()->PostDelayedTask( 228 MessageLoop::current()->PostDelayedTask(
228 FROM_HERE, timeout.callback(), base::TimeDelta::FromSeconds(4)); 229 FROM_HERE, timeout.callback(), base::TimeDelta::FromSeconds(4));
229 230
230 ExtensionProcessManager* manager = 231 ExtensionProcessManager* manager =
231 browser()->profile()->GetExtensionProcessManager(); 232 extensions::ExtensionSystem::Get(browser()->profile())->
233 process_manager();
232 ExtensionProcessManager::ViewSet all_views = manager->GetAllViews(); 234 ExtensionProcessManager::ViewSet all_views = manager->GetAllViews();
233 for (ExtensionProcessManager::ViewSet::const_iterator iter = 235 for (ExtensionProcessManager::ViewSet::const_iterator iter =
234 all_views.begin(); 236 all_views.begin();
235 iter != all_views.end();) { 237 iter != all_views.end();) {
236 if (!(*iter)->IsLoading()) 238 if (!(*iter)->IsLoading())
237 ++iter; 239 ++iter;
238 else 240 else
239 content::RunMessageLoop(); 241 content::RunMessageLoop();
240 } 242 }
241 243
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 content::CONSOLE_MESSAGE_LEVEL_LOG, 591 content::CONSOLE_MESSAGE_LEVEL_LOG,
590 "log"); 592 "log");
591 devtools_manager->AddMessageToConsole(agent_host, 593 devtools_manager->AddMessageToConsole(agent_host,
592 content::CONSOLE_MESSAGE_LEVEL_ERROR, 594 content::CONSOLE_MESSAGE_LEVEL_ERROR,
593 "error"); 595 "error");
594 RunTestFunction(window_, "checkLogAndErrorMessages"); 596 RunTestFunction(window_, "checkLogAndErrorMessages");
595 CloseDevToolsWindow(); 597 CloseDevToolsWindow();
596 } 598 }
597 599
598 } // namespace 600 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/file_handler_util.cc ('k') | chrome/browser/extensions/alert_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698