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

Side by Side Diff: chrome/browser/ui/webui/devtools_ui.cc

Issue 7438002: Deprecate Profile::GetDefaultRequestContext(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix other references. Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/webui/devtools_ui.h" 5 #include "chrome/browser/ui/webui/devtools_ui.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "chrome/browser/net/chrome_url_request_context.h" 9 #include "chrome/browser/net/chrome_url_request_context.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 return "text/plain"; 84 return "text/plain";
85 } 85 }
86 86
87 // static 87 // static
88 void DevToolsUI::RegisterDevToolsDataSource() { 88 void DevToolsUI::RegisterDevToolsDataSource() {
89 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 89 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
90 static bool registered = false; 90 static bool registered = false;
91 if (!registered) { 91 if (!registered) {
92 DevToolsDataSource* data_source = new DevToolsDataSource(); 92 DevToolsDataSource* data_source = new DevToolsDataSource();
93 ChromeURLRequestContext* context = static_cast<ChromeURLRequestContext*>( 93 ChromeURLRequestContext* context = static_cast<ChromeURLRequestContext*>(
94 Profile::GetDefaultRequestContext()->GetURLRequestContext()); 94 Profile::Deprecated::GetDefaultRequestContext()->
95 GetURLRequestContext());
95 context->chrome_url_data_manager_backend()->AddDataSource(data_source); 96 context->chrome_url_data_manager_backend()->AddDataSource(data_source);
96 registered = true; 97 registered = true;
97 } 98 }
98 } 99 }
99 100
100 DevToolsUI::DevToolsUI(TabContents* contents) : ChromeWebUI(contents) { 101 DevToolsUI::DevToolsUI(TabContents* contents) : ChromeWebUI(contents) {
101 DevToolsDataSource* data_source = new DevToolsDataSource(); 102 DevToolsDataSource* data_source = new DevToolsDataSource();
102 contents->profile()->GetChromeURLDataManager()->AddDataSource(data_source); 103 contents->profile()->GetChromeURLDataManager()->AddDataSource(data_source);
103 } 104 }
104 105
105 void DevToolsUI::RenderViewCreated(RenderViewHost* render_view_host) { 106 void DevToolsUI::RenderViewCreated(RenderViewHost* render_view_host) {
106 render_view_host->Send(new DevToolsMsg_SetupDevToolsClient( 107 render_view_host->Send(new DevToolsMsg_SetupDevToolsClient(
107 render_view_host->routing_id())); 108 render_view_host->routing_id()));
108 } 109 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698