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

Side by Side Diff: chrome/common/chrome_content_client.cc

Issue 10823035: Fix incorrect conditional when setting mobile user agent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | « no previous file | no next file » | 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 "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
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::kUseMobileUserAgent)) { 441 if (command_line->HasSwitch(switches::kUseMobileUserAgent)) {
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698