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

Side by Side Diff: chrome/browser/devtools/chrome_devtools_manager_delegate.cc

Issue 2873393002: [DevTools] Fix telemetry flakiness based on target type (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | content/browser/devtools/render_frame_devtools_agent_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/devtools/chrome_devtools_manager_delegate.h" 5 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 return DevToolsAgentHost::kTypeFrame; 358 return DevToolsAgentHost::kTypeFrame;
359 359
360 for (TabContentsIterator it; !it.done(); it.Next()) { 360 for (TabContentsIterator it; !it.done(); it.Next()) {
361 if (*it == web_contents) 361 if (*it == web_contents)
362 return DevToolsAgentHost::kTypePage; 362 return DevToolsAgentHost::kTypePage;
363 } 363 }
364 364
365 std::string extension_name; 365 std::string extension_name;
366 std::string extension_type; 366 std::string extension_type;
367 if (!GetExtensionInfo(host, &extension_name, &extension_type)) 367 if (!GetExtensionInfo(host, &extension_name, &extension_type))
368 return std::string(); 368 return DevToolsAgentHost::kTypeOther;
369 return extension_type; 369 return extension_type;
370 } 370 }
371 371
372 std::string ChromeDevToolsManagerDelegate::GetTargetTitle( 372 std::string ChromeDevToolsManagerDelegate::GetTargetTitle(
373 content::RenderFrameHost* host) { 373 content::RenderFrameHost* host) {
374 std::string extension_name; 374 std::string extension_name;
375 std::string extension_type; 375 std::string extension_type;
376 if (!GetExtensionInfo(host, &extension_name, &extension_type)) 376 if (!GetExtensionInfo(host, &extension_name, &extension_type))
377 return std::string(); 377 return std::string();
378 return extension_name; 378 return extension_name;
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 kLocationsParam); 503 kLocationsParam);
504 } 504 }
505 tcp_locations.insert(net::HostPortPair(host, port)); 505 tcp_locations.insert(net::HostPortPair(host, port));
506 } 506 }
507 507
508 host_data_[agent_host]->set_remote_locations(tcp_locations); 508 host_data_[agent_host]->set_remote_locations(tcp_locations);
509 UpdateDeviceDiscovery(); 509 UpdateDeviceDiscovery();
510 510
511 return DevToolsProtocol::CreateSuccessResponse(command_id, nullptr); 511 return DevToolsProtocol::CreateSuccessResponse(command_id, nullptr);
512 } 512 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/devtools/render_frame_devtools_agent_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698