| OLD | NEW |
| 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 "chrome/common/chrome_content_client.h" | 5 #include "chrome/common/chrome_content_client.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/cpu.h" | 8 #include "base/cpu.h" |
| 9 #include "base/debug/crash_logging.h" | 9 #include "base/debug/crash_logging.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 std::string ChromeContentClient::GetUserAgent() const { | 509 std::string ChromeContentClient::GetUserAgent() const { |
| 510 std::string product = GetProduct(); | 510 std::string product = GetProduct(); |
| 511 #if defined(OS_ANDROID) | 511 #if defined(OS_ANDROID) |
| 512 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 512 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 513 if (command_line->HasSwitch(switches::kUseMobileUserAgent)) | 513 if (command_line->HasSwitch(switches::kUseMobileUserAgent)) |
| 514 product += " Mobile"; | 514 product += " Mobile"; |
| 515 #endif | 515 #endif |
| 516 return webkit_glue::BuildUserAgentFromProduct(product); | 516 return webkit_glue::BuildUserAgentFromProduct(product); |
| 517 } | 517 } |
| 518 | 518 |
| 519 string16 ChromeContentClient::GetLocalizedString(int message_id) const { | 519 base::string16 ChromeContentClient::GetLocalizedString(int message_id) const { |
| 520 return l10n_util::GetStringUTF16(message_id); | 520 return l10n_util::GetStringUTF16(message_id); |
| 521 } | 521 } |
| 522 | 522 |
| 523 base::StringPiece ChromeContentClient::GetDataResource( | 523 base::StringPiece ChromeContentClient::GetDataResource( |
| 524 int resource_id, | 524 int resource_id, |
| 525 ui::ScaleFactor scale_factor) const { | 525 ui::ScaleFactor scale_factor) const { |
| 526 return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( | 526 return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( |
| 527 resource_id, scale_factor); | 527 resource_id, scale_factor); |
| 528 } | 528 } |
| 529 | 529 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 557 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; | 557 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; |
| 558 return true; | 558 return true; |
| 559 } | 559 } |
| 560 return false; | 560 return false; |
| 561 } | 561 } |
| 562 | 562 |
| 563 std::string ChromeContentClient::GetCarbonInterposePath() const { | 563 std::string ChromeContentClient::GetCarbonInterposePath() const { |
| 564 return std::string(kInterposeLibraryPath); | 564 return std::string(kInterposeLibraryPath); |
| 565 } | 565 } |
| 566 #endif | 566 #endif |
| OLD | NEW |