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/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
431 } | 431 } |
432 return false; | 432 return false; |
433 } | 433 } |
434 | 434 |
435 std::string ChromeContentClient::GetUserAgent() const { | 435 std::string ChromeContentClient::GetUserAgent() const { |
436 chrome::VersionInfo version_info; | 436 chrome::VersionInfo version_info; |
437 std::string product("Chrome/"); | 437 std::string product("Chrome/"); |
438 product += version_info.is_valid() ? version_info.Version() : "0.0.0.0"; | 438 product += version_info.is_valid() ? version_info.Version() : "0.0.0.0"; |
439 #if defined(OS_ANDROID) | 439 #if defined(OS_ANDROID) |
440 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 440 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
441 if (!command_line->HasSwitch(switches::kTabletUi)) { | 441 if (!command_line->HasSwitch(switches::kUseMobileUserAgent)) { |
gone
2012/07/25 18:56:09
The conditional is flipped here.
benm (inactive)
2012/07/26 09:43:36
ah shoot! Thanks for spotting, sorry for merge pai
| |
442 product += " Mobile"; | 442 product += " Mobile"; |
443 } | 443 } |
444 #endif | 444 #endif |
445 return webkit_glue::BuildUserAgentFromProduct(product); | 445 return webkit_glue::BuildUserAgentFromProduct(product); |
446 } | 446 } |
447 | 447 |
448 string16 ChromeContentClient::GetLocalizedString(int message_id) const { | 448 string16 ChromeContentClient::GetLocalizedString(int message_id) const { |
449 return l10n_util::GetStringUTF16(message_id); | 449 return l10n_util::GetStringUTF16(message_id); |
450 } | 450 } |
451 | 451 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
543 | 543 |
544 bool ChromeContentClient::GetBundledFieldTrialPepperFlash( | 544 bool ChromeContentClient::GetBundledFieldTrialPepperFlash( |
545 content::PepperPluginInfo* plugin, | 545 content::PepperPluginInfo* plugin, |
546 bool* override_npapi_flash) { | 546 bool* override_npapi_flash) { |
547 if (!ConductingPepperFlashFieldTrial()) | 547 if (!ConductingPepperFlashFieldTrial()) |
548 return false; | 548 return false; |
549 return GetBundledPepperFlash(plugin, override_npapi_flash); | 549 return GetBundledPepperFlash(plugin, override_npapi_flash); |
550 } | 550 } |
551 | 551 |
552 } // namespace chrome | 552 } // namespace chrome |
OLD | NEW |