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

Side by Side Diff: remoting/host/native_messaging/log_message_handler.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "remoting/host/native_messaging/log_message_handler.h" 5 #include "remoting/host/native_messaging/log_message_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 break; 110 break;
111 case logging::LOG_FATAL: 111 case logging::LOG_FATAL:
112 case logging::LOG_ERROR: 112 case logging::LOG_ERROR:
113 severity_string = "error"; 113 severity_string = "error";
114 break; 114 break;
115 } 115 }
116 116
117 std::string message = str.substr(message_start); 117 std::string message = str.substr(message_start);
118 base::TrimWhitespaceASCII(message, base::TRIM_ALL, &message); 118 base::TrimWhitespaceASCII(message, base::TRIM_ALL, &message);
119 119
120 scoped_ptr<base::DictionaryValue> dictionary(new base::DictionaryValue); 120 std::unique_ptr<base::DictionaryValue> dictionary(new base::DictionaryValue);
121 dictionary->SetString("type", kDebugMessageTypeName); 121 dictionary->SetString("type", kDebugMessageTypeName);
122 dictionary->SetString("severity", severity_string); 122 dictionary->SetString("severity", severity_string);
123 dictionary->SetString("message", message); 123 dictionary->SetString("message", message);
124 dictionary->SetString("file", file); 124 dictionary->SetString("file", file);
125 dictionary->SetInteger("line", line); 125 dictionary->SetInteger("line", line);
126 126
127 delegate_.Run(std::move(dictionary)); 127 delegate_.Run(std::move(dictionary));
128 128
129 suppress_logging_ = false; 129 suppress_logging_ = false;
130 } 130 }
131 131
132 } // namespace remoting 132 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/native_messaging/log_message_handler.h ('k') | remoting/host/native_messaging/native_messaging_pipe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698