Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / chromeos / launcher_search_provider / error_reporter.cc
blob050423f48d53389c42d5f422cc6a47bf80196680
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"
10 namespace chromeos {
11 namespace launcher_search_provider {
13 ErrorReporter::ErrorReporter(content::RenderFrameHost* host) : host_(host) {
16 ErrorReporter::~ErrorReporter() {
19 void ErrorReporter::Warn(const std::string& message) {
20 DCHECK(host_);
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