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

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

Issue 637023002: Misc. cleanup, primarily removing unused locals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove macros.h change Created 6 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
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 "chrome/browser/ui/webui/devtools_ui.h" 5 #include "chrome/browser/ui/webui/devtools_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/ref_counted_memory.h" 10 #include "base/memory/ref_counted_memory.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 void DevToolsDataSource::StartBundledDataRequest( 227 void DevToolsDataSource::StartBundledDataRequest(
228 const std::string& path, 228 const std::string& path,
229 int render_process_id, 229 int render_process_id,
230 int render_frame_id, 230 int render_frame_id,
231 const content::URLDataSource::GotDataCallback& callback) { 231 const content::URLDataSource::GotDataCallback& callback) {
232 std::string filename = PathWithoutParams(path); 232 std::string filename = PathWithoutParams(path);
233 233
234 int resource_id = 234 int resource_id =
235 content::DevToolsHttpHandler::GetFrontendResourceId(filename); 235 content::DevToolsHttpHandler::GetFrontendResourceId(filename);
236 236
237 DLOG_IF(WARNING, -1 == resource_id) << "Unable to find dev tool resource: " 237 DLOG_IF(WARNING, resource_id == -1)
238 << filename << ". If you compiled with debug_devtools=1, try running" 238 << "Unable to find dev tool resource: " << filename
239 " with --debug-devtools."; 239 << ". If you compiled with debug_devtools=1, try running with "
240 "--debug-devtools.";
240 const ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 241 const ResourceBundle& rb = ResourceBundle::GetSharedInstance();
241 scoped_refptr<base::RefCountedStaticMemory> bytes(rb.LoadDataResourceBytes( 242 scoped_refptr<base::RefCountedStaticMemory> bytes(rb.LoadDataResourceBytes(
242 resource_id)); 243 resource_id));
243 callback.Run(bytes.get()); 244 callback.Run(bytes.get());
244 } 245 }
245 246
246 void DevToolsDataSource::StartRemoteDataRequest( 247 void DevToolsDataSource::StartRemoteDataRequest(
247 const std::string& path, 248 const std::string& path,
248 int render_process_id, 249 int render_process_id,
249 int render_frame_id, 250 int render_frame_id,
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 content::NavigationController& navigation_controller = 407 content::NavigationController& navigation_controller =
407 web_ui()->GetWebContents()->GetController(); 408 web_ui()->GetWebContents()->GetController();
408 content::NavigationController::LoadURLParams params(url); 409 content::NavigationController::LoadURLParams params(url);
409 params.should_replace_current_entry = true; 410 params.should_replace_current_entry = true;
410 remote_frontend_loading_url_ = virtual_url; 411 remote_frontend_loading_url_ = virtual_url;
411 navigation_controller.LoadURLWithParams(params); 412 navigation_controller.LoadURLWithParams(params);
412 navigation_controller.GetPendingEntry()->SetVirtualURL(virtual_url); 413 navigation_controller.GetPendingEntry()->SetVirtualURL(virtual_url);
413 414
414 bindings_.AttachTo(page->GetTarget()->GetAgentHost()); 415 bindings_.AttachTo(page->GetTarget()->GetAgentHost());
415 } 416 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698