Send compressed histograms with system logs when sending feedback.
[chromium-blink-merge.git] / apps / shell / app_shell_content_client.cc
blob286f3dca4876682bc4b65fe01c59bf69a3c50991
1 // Copyright 2013 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 "apps/shell/app_shell_content_client.h"
7 #include "base/strings/string_piece.h"
8 #include "base/strings/utf_string_conversions.h"
9 #include "ui/base/l10n/l10n_util.h"
10 #include "ui/base/resource/resource_bundle.h"
11 #include "webkit/common/user_agent/user_agent_util.h"
13 namespace apps {
15 AppShellContentClient::AppShellContentClient() {}
17 AppShellContentClient::~AppShellContentClient() {}
19 std::string AppShellContentClient::GetUserAgent() const {
20 // TODO(derat): Figure out what this should be for app_shell and determine
21 // whether we need to include a version number to placate browser sniffing.
22 return webkit_glue::BuildUserAgentFromProduct("Chrome");
25 string16 AppShellContentClient::GetLocalizedString(int message_id) const {
26 return l10n_util::GetStringUTF16(message_id);
29 base::StringPiece AppShellContentClient::GetDataResource(
30 int resource_id,
31 ui::ScaleFactor scale_factor) const {
32 return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
33 resource_id, scale_factor);
36 base::RefCountedStaticMemory* AppShellContentClient::GetDataResourceBytes(
37 int resource_id) const {
38 return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id);
41 gfx::Image& AppShellContentClient::GetNativeImageNamed(int resource_id) const {
42 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id);
45 } // namespace apps