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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 // Any Chrome-specific messages (apart from those listed in | 421 // Any Chrome-specific messages (apart from those listed in |
422 // CanSendWhileSwappedOut) that must be handled by the browser when sent from | 422 // CanSendWhileSwappedOut) that must be handled by the browser when sent from |
423 // swapped out renderers. | 423 // swapped out renderers. |
424 return false; | 424 return false; |
425 } | 425 } |
426 | 426 |
427 std::string ChromeContentClient::GetProduct() const { | 427 std::string ChromeContentClient::GetProduct() const { |
428 return GetProductImpl(); | 428 return GetProductImpl(); |
429 } | 429 } |
430 | 430 |
| 431 std::string ChromeContentClient::GetProductSCMRevision() const { |
| 432 chrome::VersionInfo version_info; |
| 433 std::string revision("@"); |
| 434 revision += version_info.is_valid() ? version_info.LastChange() : "0"; |
| 435 return revision; |
| 436 } |
| 437 |
431 std::string ChromeContentClient::GetUserAgent() const { | 438 std::string ChromeContentClient::GetUserAgent() const { |
432 std::string product = GetProduct(); | 439 std::string product = GetProduct(); |
433 #if defined(OS_ANDROID) | 440 #if defined(OS_ANDROID) |
434 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 441 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
435 if (command_line->HasSwitch(switches::kUseMobileUserAgent)) | 442 if (command_line->HasSwitch(switches::kUseMobileUserAgent)) |
436 product += " Mobile"; | 443 product += " Mobile"; |
437 #endif | 444 #endif |
438 return webkit_glue::BuildUserAgentFromProduct(product); | 445 return webkit_glue::BuildUserAgentFromProduct(product); |
439 } | 446 } |
440 | 447 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 } | 490 } |
484 return false; | 491 return false; |
485 } | 492 } |
486 | 493 |
487 std::string ChromeContentClient::GetCarbonInterposePath() const { | 494 std::string ChromeContentClient::GetCarbonInterposePath() const { |
488 return std::string(kInterposeLibraryPath); | 495 return std::string(kInterposeLibraryPath); |
489 } | 496 } |
490 #endif | 497 #endif |
491 | 498 |
492 } // namespace chrome | 499 } // namespace chrome |
OLD | NEW |