diff options
author | sque <sque@chromium.org> | 2015-11-04 16:01:03 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-05 00:01:45 +0000 |
commit | 0f78ba540eb43fb2bb3b7726eeb41d22bfee09a3 (patch) | |
tree | 9e41091bd7485e2815a4b7006754bbae1a0ed120 /components/open_from_clipboard | |
parent | 193cb320a7c371dc1fa640ea6c05776db8913983 (diff) | |
download | chromium_src-0f78ba540eb43fb2bb3b7726eeb41d22bfee09a3.zip chromium_src-0f78ba540eb43fb2bb3b7726eeb41d22bfee09a3.tar.gz chromium_src-0f78ba540eb43fb2bb3b7726eeb41d22bfee09a3.tar.bz2 |
base: SysInfo::Uptime() returns a TimeDelta
This makes more sense than returning a number of milliseconds, especially
when the function name does not reflect the return value type.
In a few places, the number of milliseconds is converted into a TimeDelta
anyway. So this patch simplifies some of the code out there.
BUG=chromium:157548
TEST=build successfully, SysInfoTest passes
TBR=jif@chromium.org
Signed-off-by: Simon Que <sque@chromium.org>
Review URL: https://codereview.chromium.org/1417673009
Cr-Commit-Position: refs/heads/master@{#357937}
Diffstat (limited to 'components/open_from_clipboard')
-rw-r--r-- | components/open_from_clipboard/clipboard_recent_content_ios.mm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/components/open_from_clipboard/clipboard_recent_content_ios.mm b/components/open_from_clipboard/clipboard_recent_content_ios.mm index 123c4aa..98eaa2a 100644 --- a/components/open_from_clipboard/clipboard_recent_content_ios.mm +++ b/components/open_from_clipboard/clipboard_recent_content_ios.mm @@ -70,9 +70,7 @@ - (void)didBecomeActive:(NSNotification*)notification { if (_delegate) { _delegate->LoadFromUserDefaults(); - base::TimeDelta uptime = - base::TimeDelta::FromMilliseconds(base::SysInfo::Uptime()); - if (_delegate->HasPasteboardChanged(uptime)) { + if (_delegate->HasPasteboardChanged(base::SysInfo::Uptime())) { _delegate->PasteboardChanged(); } } @@ -168,7 +166,7 @@ ClipboardRecentContentIOS::ClipboardRecentContentIOS( NSUserDefaults* group_user_defaults) : application_scheme_(application_scheme), shared_user_defaults_([group_user_defaults retain]) { - Init(base::TimeDelta::FromMilliseconds(base::SysInfo::Uptime())); + Init(base::SysInfo::Uptime()); } ClipboardRecentContentIOS::ClipboardRecentContentIOS( |