Don't leave aborted URLs in the omnibox unless we're on the NTP.
[chromium-blink-merge.git] / base / process / process_info_win.cc
blobb930ae6dd8864bd0e9954e2794e68328f204127e
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
3 // found in the LICENSE file.
5 #include "base/process/process_info.h"
7 #include <windows.h>
9 #include "base/basictypes.h"
10 #include "base/time/time.h"
12 namespace base {
14 //static
15 const Time CurrentProcessInfo::CreationTime() {
16 FILETIME creation_time = {};
17 FILETIME ignore = {};
18 if (::GetProcessTimes(::GetCurrentProcess(), &creation_time, &ignore,
19 &ignore, &ignore) == false)
20 return Time();
22 return Time::FromFileTime(creation_time);
25 } // namespace base