OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/chromeos/launcher_search_provider/error_reporter.h" | |
6 | |
7 #include "content/public/common/console_message_level.h" | |
8 #include "extensions/common/extension_messages.h" | |
9 | |
10 namespace chromeos { | |
11 namespace launcher_search_provider { | |
12 | |
13 ErrorReporter::ErrorReporter(IPC::Sender* sender, const int routing_id) | |
14 : sender_(sender), routing_id_(routing_id) { | |
15 } | |
16 | |
17 ErrorReporter::~ErrorReporter() { | |
18 } | |
19 | |
20 void ErrorReporter::Warn(const std::string& message) { | |
21 if (sender_ == nullptr) | |
Matt Giuca
2015/05/05 04:25:30
DCHECK(sender);
The only time sender should be nu
yawano
2015/05/07 06:24:55
Done.
| |
22 return; | |
23 | |
24 sender_->Send(new ExtensionMsg_AddMessageToConsole( | |
25 routing_id_, content::ConsoleMessageLevel::CONSOLE_MESSAGE_LEVEL_WARNING, | |
26 message)); | |
27 } | |
28 | |
29 } // namespace launcher_search_provider | |
30 } // namespace chromeos | |
OLD | NEW |