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

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

Issue 2218003006: [DevTools] Do not escape page titles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/devtools_targets_ui.h" 5 #include "chrome/browser/devtools/devtools_targets_ui.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 } 439 }
440 440
441 base::DictionaryValue* DevToolsTargetsUIHandler::Serialize( 441 base::DictionaryValue* DevToolsTargetsUIHandler::Serialize(
442 const DevToolsTargetImpl& target) { 442 const DevToolsTargetImpl& target) {
443 base::DictionaryValue* target_data = new base::DictionaryValue(); 443 base::DictionaryValue* target_data = new base::DictionaryValue();
444 target_data->SetString(kTargetSourceField, source_id_); 444 target_data->SetString(kTargetSourceField, source_id_);
445 target_data->SetString(kTargetIdField, target.GetId()); 445 target_data->SetString(kTargetIdField, target.GetId());
446 target_data->SetString(kTargetTypeField, target.GetType()); 446 target_data->SetString(kTargetTypeField, target.GetType());
447 target_data->SetBoolean(kAttachedField, target.IsAttached()); 447 target_data->SetBoolean(kAttachedField, target.IsAttached());
448 target_data->SetString(kUrlField, target.GetURL().spec()); 448 target_data->SetString(kUrlField, target.GetURL().spec());
449 target_data->SetString(kNameField, net::EscapeForHTML(target.GetTitle())); 449 target_data->SetString(kNameField, target.GetTitle());
450 target_data->SetString(kFaviconUrlField, target.GetFaviconURL().spec()); 450 target_data->SetString(kFaviconUrlField, target.GetFaviconURL().spec());
451 target_data->SetString(kDescriptionField, target.GetDescription()); 451 target_data->SetString(kDescriptionField, target.GetDescription());
452 return target_data; 452 return target_data;
453 } 453 }
454 454
455 void DevToolsTargetsUIHandler::SendSerializedTargets( 455 void DevToolsTargetsUIHandler::SendSerializedTargets(
456 const base::ListValue& list) { 456 const base::ListValue& list) {
457 callback_.Run(source_id_, list); 457 callback_.Run(source_id_, list);
458 } 458 }
459 459
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 device_status_dict->SetString(kPortForwardingBrowserId, 496 device_status_dict->SetString(kPortForwardingBrowserId,
497 sit->first->GetId()); 497 sit->first->GetId());
498 498
499 std::string device_id = base::StringPrintf( 499 std::string device_id = base::StringPrintf(
500 kAdbDeviceIdFormat, 500 kAdbDeviceIdFormat,
501 sit->first->serial().c_str()); 501 sit->first->serial().c_str());
502 result.Set(device_id, device_status_dict); 502 result.Set(device_id, device_status_dict);
503 } 503 }
504 callback_.Run(result); 504 callback_.Run(result);
505 } 505 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698