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

Side by Side Diff: chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc

Issue 168953002: Cleanup: Move kChromeDevToolsScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/command_line.h" 5 #include "base/command_line.h"
6 #include "chrome/browser/chrome_notification_types.h" 6 #include "chrome/browser/chrome_notification_types.h"
7 #include "chrome/browser/devtools/devtools_window.h" 7 #include "chrome/browser/devtools/devtools_window.h"
8 #include "chrome/browser/search/search.h" 8 #include "chrome/browser/search/search.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_commands.h" 10 #include "chrome/browser/ui/browser_commands.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 scoped_ptr<content::RenderWidgetHostIterator> widgets( 44 scoped_ptr<content::RenderWidgetHostIterator> widgets(
45 RenderWidgetHost::GetRenderWidgetHosts()); 45 RenderWidgetHost::GetRenderWidgetHosts());
46 while (content::RenderWidgetHost* widget = widgets->GetNextHost()) { 46 while (content::RenderWidgetHost* widget = widgets->GetNextHost()) {
47 if (!widget->GetProcess()->HasConnection()) 47 if (!widget->GetProcess()->HasConnection())
48 continue; 48 continue;
49 if (!widget->IsRenderView()) 49 if (!widget->IsRenderView())
50 continue; 50 continue;
51 RenderViewHost* host = RenderViewHost::From(widget); 51 RenderViewHost* host = RenderViewHost::From(widget);
52 WebContents* contents = WebContents::FromRenderViewHost(host); 52 WebContents* contents = WebContents::FromRenderViewHost(host);
53 GURL url = contents->GetURL(); 53 GURL url = contents->GetURL();
54 if (url.SchemeIs(chrome::kChromeDevToolsScheme)) 54 if (url.SchemeIs(content::kChromeDevToolsScheme))
55 return host; 55 return host;
56 } 56 }
57 return NULL; 57 return NULL;
58 } 58 }
59 59
60 } // namespace 60 } // namespace
61 61
62 class ChromeRenderProcessHostTest : public InProcessBrowserTest { 62 class ChromeRenderProcessHostTest : public InProcessBrowserTest {
63 public: 63 public:
64 ChromeRenderProcessHostTest() {} 64 ChromeRenderProcessHostTest() {}
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 chrome::NOTIFICATION_BROWSER_CLOSED, 469 chrome::NOTIFICATION_BROWSER_CLOSED,
470 content::NotificationService::AllSources()); 470 content::NotificationService::AllSources());
471 471
472 // Kill the renderer process, simulating a crash. This should the ProcessDied 472 // Kill the renderer process, simulating a crash. This should the ProcessDied
473 // method to be called. Alternatively, RenderProcessHost::OnChannelError can 473 // method to be called. Alternatively, RenderProcessHost::OnChannelError can
474 // be called to directly force a call to ProcessDied. 474 // be called to directly force a call to ProcessDied.
475 base::KillProcess(wc1->GetRenderProcessHost()->GetHandle(), -1, true); 475 base::KillProcess(wc1->GetRenderProcessHost()->GetHandle(), -1, true);
476 476
477 observer.Wait(); 477 observer.Wait();
478 } 478 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | chrome/browser/tab_contents/render_view_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698