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 void ErrorReporter::Warn(const std::string& message) { |
| 18 if (sender_ == nullptr) |
| 19 return; |
| 20 |
| 21 sender_->Send(new ExtensionMsg_AddMessageToConsole( |
| 22 routing_id_, content::ConsoleMessageLevel::CONSOLE_MESSAGE_LEVEL_WARNING, |
| 23 message)); |
| 24 } |
| 25 |
| 26 } // namespace launcher_search_provider |
| 27 } // namespace chromeos |
OLD | NEW |