| 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/debug/crash_logging.h" |    8 #include "base/debug/crash_logging.h" | 
|    9 #include "base/files/file_util.h" |    9 #include "base/files/file_util.h" | 
|   10 #include "base/path_service.h" |   10 #include "base/path_service.h" | 
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  404   *plugin = CreatePepperFlashInfo(flash_path, FLAPPER_VERSION_STRING); |  404   *plugin = CreatePepperFlashInfo(flash_path, FLAPPER_VERSION_STRING); | 
|  405   return true; |  405   return true; | 
|  406 #else |  406 #else | 
|  407   return false; |  407   return false; | 
|  408 #endif  // FLAPPER_AVAILABLE |  408 #endif  // FLAPPER_AVAILABLE | 
|  409 } |  409 } | 
|  410 #endif  // defined(ENABLE_PLUGINS) |  410 #endif  // defined(ENABLE_PLUGINS) | 
|  411  |  411  | 
|  412 std::string GetProduct() { |  412 std::string GetProduct() { | 
|  413   chrome::VersionInfo version_info; |  413   chrome::VersionInfo version_info; | 
|  414   return version_info.is_valid() ? |  414   return version_info.ProductNameAndVersionForUserAgent(); | 
|  415       version_info.ProductNameAndVersionForUserAgent() : std::string(); |  | 
|  416 } |  415 } | 
|  417  |  416  | 
|  418 }  // namespace |  417 }  // namespace | 
|  419  |  418  | 
|  420 std::string GetUserAgent() { |  419 std::string GetUserAgent() { | 
|  421   CommandLine* command_line = CommandLine::ForCurrentProcess(); |  420   CommandLine* command_line = CommandLine::ForCurrentProcess(); | 
|  422   if (command_line->HasSwitch(switches::kUserAgent)) { |  421   if (command_line->HasSwitch(switches::kUserAgent)) { | 
|  423     std::string ua = command_line->GetSwitchValueASCII(switches::kUserAgent); |  422     std::string ua = command_line->GetSwitchValueASCII(switches::kUserAgent); | 
|  424     if (net::HttpUtil::IsValidHeaderValue(ua)) |  423     if (net::HttpUtil::IsValidHeaderValue(ua)) | 
|  425       return ua; |  424       return ua; | 
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  536     int sandbox_type, |  535     int sandbox_type, | 
|  537     int* sandbox_profile_resource_id) const { |  536     int* sandbox_profile_resource_id) const { | 
|  538   DCHECK(sandbox_profile_resource_id); |  537   DCHECK(sandbox_profile_resource_id); | 
|  539   if (sandbox_type == NACL_SANDBOX_TYPE_NACL_LOADER) { |  538   if (sandbox_type == NACL_SANDBOX_TYPE_NACL_LOADER) { | 
|  540     *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; |  539     *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; | 
|  541     return true; |  540     return true; | 
|  542   } |  541   } | 
|  543   return false; |  542   return false; | 
|  544 } |  543 } | 
|  545 #endif |  544 #endif | 
| OLD | NEW |