| Index: chrome/browser/chromeos/launcher_search_provider/error_reporter.cc
|
| diff --git a/chrome/browser/chromeos/launcher_search_provider/error_reporter.cc b/chrome/browser/chromeos/launcher_search_provider/error_reporter.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..22322a3d5eeba3842c05972c74c5c6224d86f36e
|
| --- /dev/null
|
| +++ b/chrome/browser/chromeos/launcher_search_provider/error_reporter.cc
|
| @@ -0,0 +1,27 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/browser/chromeos/launcher_search_provider/error_reporter.h"
|
| +
|
| +#include "content/public/common/console_message_level.h"
|
| +#include "extensions/common/extension_messages.h"
|
| +
|
| +namespace chromeos {
|
| +namespace launcher_search_provider {
|
| +
|
| +ErrorReporter::ErrorReporter(IPC::Sender* sender, const int routing_id)
|
| + : sender_(sender), routing_id_(routing_id) {
|
| +}
|
| +
|
| +void ErrorReporter::Warn(const std::string& message) {
|
| + if (sender_ == nullptr)
|
| + return;
|
| +
|
| + sender_->Send(new ExtensionMsg_AddMessageToConsole(
|
| + routing_id_, content::ConsoleMessageLevel::CONSOLE_MESSAGE_LEVEL_WARNING,
|
| + message));
|
| +}
|
| +
|
| +} // namespace launcher_search_provider
|
| +} // namespace chromeos
|
|
|