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 "webkit/support/webkit_support.h" | 5 #include "webkit/support/webkit_support.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/base64.h" | 8 #include "base/base64.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 | 733 |
734 private: | 734 private: |
735 base::ScopedTempDir tempDirectory_; | 735 base::ScopedTempDir tempDirectory_; |
736 }; | 736 }; |
737 | 737 |
738 ScopedTempDirectory* CreateScopedTempDirectory() { | 738 ScopedTempDirectory* CreateScopedTempDirectory() { |
739 return new ScopedTempDirectoryInternal(); | 739 return new ScopedTempDirectoryInternal(); |
740 } | 740 } |
741 | 741 |
742 int64 GetCurrentTimeInMillisecond() { | 742 int64 GetCurrentTimeInMillisecond() { |
743 return base::TimeTicks::Now().ToInternalValue() | 743 return base::TimeDelta(base::Time::Now() - |
744 / base::Time::kMicrosecondsPerMillisecond; | 744 base::Time::UnixEpoch()).ToInternalValue() / |
| 745 base::Time::kMicrosecondsPerMillisecond; |
745 } | 746 } |
746 | 747 |
747 std::string EscapePath(const std::string& path) { | 748 std::string EscapePath(const std::string& path) { |
748 return net::EscapePath(path); | 749 return net::EscapePath(path); |
749 } | 750 } |
750 | 751 |
751 std::string MakeURLErrorDescription(const WebKit::WebURLError& error) { | 752 std::string MakeURLErrorDescription(const WebKit::WebURLError& error) { |
752 std::string domain = error.domain.utf8(); | 753 std::string domain = error.domain.utf8(); |
753 int code = error.reason; | 754 int code = error.reason; |
754 | 755 |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
881 // Logging | 882 // Logging |
882 void EnableWebCoreLogChannels(const std::string& channels) { | 883 void EnableWebCoreLogChannels(const std::string& channels) { |
883 webkit_glue::EnableWebCoreLogChannels(channels); | 884 webkit_glue::EnableWebCoreLogChannels(channels); |
884 } | 885 } |
885 | 886 |
886 void SetGamepadData(const WebKit::WebGamepads& pads) { | 887 void SetGamepadData(const WebKit::WebGamepads& pads) { |
887 test_environment->webkit_platform_support()->setGamepadData(pads); | 888 test_environment->webkit_platform_support()->setGamepadData(pads); |
888 } | 889 } |
889 | 890 |
890 } // namespace webkit_support | 891 } // namespace webkit_support |
OLD | NEW |