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.
5 #include "chrome/browser/chromeos/launcher_search_provider/error_reporter.h"
7 #include "content/public/browser/render_frame_host.h"
8 #include "content/public/common/console_message_level.h"
11 namespace launcher_search_provider
{
13 ErrorReporter::ErrorReporter(content::RenderFrameHost
* host
) : host_(host
) {
16 ErrorReporter::~ErrorReporter() {
19 void ErrorReporter::Warn(const std::string
& message
) {
22 host_
->AddMessageToConsole(
23 content::ConsoleMessageLevel::CONSOLE_MESSAGE_LEVEL_WARNING
, message
);
26 scoped_ptr
<ErrorReporter
> ErrorReporter::Duplicate() {
27 return make_scoped_ptr(new ErrorReporter(host_
));
30 } // namespace launcher_search_provider
31 } // namespace chromeos