Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: net/tools/get_server_time/get_server_time.cc

Issue 16652007: Use a direct include of strings headers in net/test/, net/third_party/, net/tools/, net/udp/, net/u… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/tools/gdig/gdig.cc ('k') | net/tools/quic/spdy_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // This is a small utility that snarfs the server time from the 5 // This is a small utility that snarfs the server time from the
6 // response headers of an http/https HEAD request and compares it to 6 // response headers of an http/https HEAD request and compares it to
7 // the local time. 7 // the local time.
8 // 8 //
9 // TODO(akalin): Also snarf the server time from the TLS handshake, if 9 // TODO(akalin): Also snarf the server time from the TLS handshake, if
10 // any (http://crbug.com/146090). 10 // any (http://crbug.com/146090).
11 11
12 #include <cstdio> 12 #include <cstdio>
13 #include <cstdlib> 13 #include <cstdlib>
14 #include <string> 14 #include <string>
15 15
16 #include "base/at_exit.h" 16 #include "base/at_exit.h"
17 #include "base/basictypes.h" 17 #include "base/basictypes.h"
18 #include "base/command_line.h" 18 #include "base/command_line.h"
19 #include "base/compiler_specific.h" 19 #include "base/compiler_specific.h"
20 #include "base/format_macros.h" 20 #include "base/format_macros.h"
21 #include "base/i18n/time_formatting.h" 21 #include "base/i18n/time_formatting.h"
22 #include "base/json/json_writer.h" 22 #include "base/json/json_writer.h"
23 #include "base/logging.h" 23 #include "base/logging.h"
24 #include "base/memory/ref_counted.h" 24 #include "base/memory/ref_counted.h"
25 #include "base/memory/scoped_ptr.h" 25 #include "base/memory/scoped_ptr.h"
26 #include "base/message_loop.h" 26 #include "base/message_loop.h"
27 #include "base/single_thread_task_runner.h" 27 #include "base/single_thread_task_runner.h"
28 #include "base/string_number_conversions.h" 28 #include "base/strings/string_number_conversions.h"
29 #include "base/strings/utf_string_conversions.h" 29 #include "base/strings/utf_string_conversions.h"
30 #include "base/time.h" 30 #include "base/time.h"
31 #include "base/values.h" 31 #include "base/values.h"
32 #include "build/build_config.h" 32 #include "build/build_config.h"
33 #include "googleurl/src/gurl.h" 33 #include "googleurl/src/gurl.h"
34 #include "net/base/net_errors.h" 34 #include "net/base/net_errors.h"
35 #include "net/base/net_log.h" 35 #include "net/base/net_log.h"
36 #include "net/http/http_response_headers.h" 36 #include "net/http/http_response_headers.h"
37 #include "net/url_request/url_fetcher.h" 37 #include "net/url_request/url_fetcher.h"
38 #include "net/url_request/url_fetcher_delegate.h" 38 #include "net/url_request/url_fetcher_delegate.h"
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 &skew, &skew_uncertainty); 348 &skew, &skew_uncertainty);
349 349
350 std::printf( 350 std::printf(
351 "An estimate for the local clock skew is %.2f ms with " 351 "An estimate for the local clock skew is %.2f ms with "
352 "uncertainty %.2f ms\n", 352 "uncertainty %.2f ms\n",
353 skew.InMillisecondsF(), 353 skew.InMillisecondsF(),
354 skew_uncertainty.InMillisecondsF()); 354 skew_uncertainty.InMillisecondsF());
355 355
356 return EXIT_SUCCESS; 356 return EXIT_SUCCESS;
357 } 357 }
OLDNEW
« no previous file with comments | « net/tools/gdig/gdig.cc ('k') | net/tools/quic/spdy_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698