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

Side by Side Diff: content/renderer/devtools/devtools_agent.cc

Issue 2891933004: Remove raw base::DictionaryValue::Set in //content (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
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 "content/renderer/devtools/devtools_agent.h" 5 #include "content/renderer/devtools/devtools_agent.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 #include <utility>
10 11
11 #include "base/json/json_writer.h" 12 #include "base/json/json_writer.h"
12 #include "base/lazy_instance.h" 13 #include "base/lazy_instance.h"
13 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
14 #include "base/run_loop.h" 15 #include "base/run_loop.h"
15 #include "base/strings/string_number_conversions.h" 16 #include "base/strings/string_number_conversions.h"
16 #include "base/threading/non_thread_safe.h" 17 #include "base/threading/non_thread_safe.h"
17 #include "base/trace_event/trace_event.h" 18 #include "base/trace_event/trace_event.h"
18 #include "content/common/devtools_messages.h" 19 #include "content/common/devtools_messages.h"
19 #include "content/common/frame_messages.h" 20 #include "content/common/frame_messages.h"
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 if (error.critical) 332 if (error.critical)
332 failed = true; 333 failed = true;
333 errors->Append(std::move(error_value)); 334 errors->Append(std::move(error_value));
334 } 335 }
335 336
336 WebString url = 337 WebString url =
337 frame_->GetWebFrame()->GetDocument().ManifestURL().GetString(); 338 frame_->GetWebFrame()->GetDocument().ManifestURL().GetString();
338 result->SetString("url", url.Utf16()); 339 result->SetString("url", url.Utf16());
339 if (!failed) 340 if (!failed)
340 result->SetString("data", debug_info.raw_data); 341 result->SetString("data", debug_info.raw_data);
341 result->Set("errors", errors.release()); 342 result->Set("errors", std::move(errors));
342 response->Set("result", result.release()); 343 response->Set("result", std::move(result));
343 344
344 std::string json_message; 345 std::string json_message;
345 base::JSONWriter::Write(*response, &json_message); 346 base::JSONWriter::Write(*response, &json_message);
346 SendChunkedProtocolMessage(this, routing_id(), session_id, call_id, 347 SendChunkedProtocolMessage(this, routing_id(), session_id, call_id,
347 json_message, std::string()); 348 json_message, std::string());
348 } 349 }
349 350
350 } // namespace content 351 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/webrtc/webrtc_internals.cc ('k') | content/renderer/media/peer_connection_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698