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

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

Issue 10808052: Tidy up Android's is-tablet functionality. (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
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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 } 428 }
429 return false; 429 return false;
430 } 430 }
431 431
432 std::string ChromeContentClient::GetUserAgent() const { 432 std::string ChromeContentClient::GetUserAgent() const {
433 chrome::VersionInfo version_info; 433 chrome::VersionInfo version_info;
434 std::string product("Chrome/"); 434 std::string product("Chrome/");
435 product += version_info.is_valid() ? version_info.Version() : "0.0.0.0"; 435 product += version_info.is_valid() ? version_info.Version() : "0.0.0.0";
436 #if defined(OS_ANDROID) 436 #if defined(OS_ANDROID)
437 CommandLine* command_line = CommandLine::ForCurrentProcess(); 437 CommandLine* command_line = CommandLine::ForCurrentProcess();
438 if (!command_line->HasSwitch(switches::kTabletUi)) { 438 if (!command_line->HasSwitch(switches::kUseMobileUserAgent)) {
439 product += " Mobile"; 439 product += " Mobile";
440 } 440 }
441 #endif 441 #endif
442 return webkit_glue::BuildUserAgentFromProduct(product); 442 return webkit_glue::BuildUserAgentFromProduct(product);
443 } 443 }
444 444
445 string16 ChromeContentClient::GetLocalizedString(int message_id) const { 445 string16 ChromeContentClient::GetLocalizedString(int message_id) const {
446 return l10n_util::GetStringUTF16(message_id); 446 return l10n_util::GetStringUTF16(message_id);
447 } 447 }
448 448
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 536
537 bool ChromeContentClient::GetBundledFieldTrialPepperFlash( 537 bool ChromeContentClient::GetBundledFieldTrialPepperFlash(
538 content::PepperPluginInfo* plugin, 538 content::PepperPluginInfo* plugin,
539 bool* override_npapi_flash) { 539 bool* override_npapi_flash) {
540 if (!ConductingPepperFlashFieldTrial()) 540 if (!ConductingPepperFlashFieldTrial())
541 return false; 541 return false;
542 return GetBundledPepperFlash(plugin, override_npapi_flash); 542 return GetBundledPepperFlash(plugin, override_npapi_flash);
543 } 543 }
544 544
545 } // namespace chrome 545 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698