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

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

Issue 2378173002: Precache per-resource cap should be applied on network bytes used (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « google_apis/drive/base_requests.cc ('k') | net/url_request/test_url_fetcher_factory.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).
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 ~QuitDelegate() override {} 77 ~QuitDelegate() override {}
78 78
79 // net::URLFetcherDelegate implementation. 79 // net::URLFetcherDelegate implementation.
80 void OnURLFetchComplete(const net::URLFetcher* source) override { 80 void OnURLFetchComplete(const net::URLFetcher* source) override {
81 base::MessageLoop::current()->QuitWhenIdle(); 81 base::MessageLoop::current()->QuitWhenIdle();
82 } 82 }
83 83
84 void OnURLFetchDownloadProgress(const net::URLFetcher* source, 84 void OnURLFetchDownloadProgress(const net::URLFetcher* source,
85 int64_t current, 85 int64_t current,
86 int64_t total) override { 86 int64_t total,
87 int64_t current_network_bytes) override {
87 NOTREACHED(); 88 NOTREACHED();
88 } 89 }
89 90
90 void OnURLFetchUploadProgress(const net::URLFetcher* source, 91 void OnURLFetchUploadProgress(const net::URLFetcher* source,
91 int64_t current, 92 int64_t current,
92 int64_t total) override { 93 int64_t total) override {
93 NOTREACHED(); 94 NOTREACHED();
94 } 95 }
95 96
96 private: 97 private:
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 &skew, &skew_uncertainty); 320 &skew, &skew_uncertainty);
320 321
321 std::printf( 322 std::printf(
322 "An estimate for the local clock skew is %.2f ms with " 323 "An estimate for the local clock skew is %.2f ms with "
323 "uncertainty %.2f ms\n", 324 "uncertainty %.2f ms\n",
324 skew.InMillisecondsF(), 325 skew.InMillisecondsF(),
325 skew_uncertainty.InMillisecondsF()); 326 skew_uncertainty.InMillisecondsF());
326 327
327 return EXIT_SUCCESS; 328 return EXIT_SUCCESS;
328 } 329 }
OLDNEW
« no previous file with comments | « google_apis/drive/base_requests.cc ('k') | net/url_request/test_url_fetcher_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698