Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Side by Side Diff: content/shell/shell_content_client.cc

Issue 10869073: Split user agent code out of the 'glue' target (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to trunk Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/public/common/content_client.cc ('k') | webkit/glue/user_agent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/shell_content_client.h" 5 #include "content/shell/shell_content_client.h"
6 6
7 #include "base/string_piece.h" 7 #include "base/string_piece.h"
8 #include "ui/base/l10n/l10n_util.h" 8 #include "ui/base/l10n/l10n_util.h"
9 #include "ui/base/resource/resource_bundle.h" 9 #include "ui/base/resource/resource_bundle.h"
10 #include "webkit/glue/user_agent.h" 10 #include "webkit/user_agent/user_agent_util.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 ShellContentClient::~ShellContentClient() { 14 ShellContentClient::~ShellContentClient() {
15 } 15 }
16 16
17 std::string ShellContentClient::GetUserAgent() const { 17 std::string ShellContentClient::GetUserAgent() const {
18 // The "19" is so that sites that sniff for version think that this is 18 // The "19" is so that sites that sniff for version think that this is
19 // something reasonably current; the "77.34.5" is a hint that this isn't a 19 // something reasonably current; the "77.34.5" is a hint that this isn't a
20 // standard Chrome. 20 // standard Chrome.
21 return webkit_glue::BuildUserAgentFromProduct("Chrome/19.77.34.5"); 21 return webkit_glue::BuildUserAgentFromProduct("Chrome/19.77.34.5");
22 } 22 }
23 23
24 string16 ShellContentClient::GetLocalizedString(int message_id) const { 24 string16 ShellContentClient::GetLocalizedString(int message_id) const {
25 return l10n_util::GetStringUTF16(message_id); 25 return l10n_util::GetStringUTF16(message_id);
26 } 26 }
27 27
28 base::StringPiece ShellContentClient::GetDataResource( 28 base::StringPiece ShellContentClient::GetDataResource(
29 int resource_id, 29 int resource_id,
30 ui::ScaleFactor scale_factor) const { 30 ui::ScaleFactor scale_factor) const {
31 return ResourceBundle::GetSharedInstance().GetRawDataResource( 31 return ResourceBundle::GetSharedInstance().GetRawDataResource(
32 resource_id, scale_factor); 32 resource_id, scale_factor);
33 } 33 }
34 34
35 } // namespace content 35 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_client.cc ('k') | webkit/glue/user_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698