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

Side by Side Diff: net/log/net_log_util.cc

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 years 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 | « net/log/net_log_unittest.cc ('k') | net/log/test_net_log.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "net/log/net_log_util.h" 5 #include "net/log/net_log_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 dict->SetInteger("ADDRESS_FAMILY_IPV4", ADDRESS_FAMILY_IPV4); 268 dict->SetInteger("ADDRESS_FAMILY_IPV4", ADDRESS_FAMILY_IPV4);
269 dict->SetInteger("ADDRESS_FAMILY_IPV6", ADDRESS_FAMILY_IPV6); 269 dict->SetInteger("ADDRESS_FAMILY_IPV6", ADDRESS_FAMILY_IPV6);
270 270
271 constants_dict->Set("addressFamily", dict.Pass()); 271 constants_dict->Set("addressFamily", dict.Pass());
272 } 272 }
273 273
274 // Information about how the "time ticks" values we have given it relate to 274 // Information about how the "time ticks" values we have given it relate to
275 // actual system times. Time ticks are used throughout since they are stable 275 // actual system times. Time ticks are used throughout since they are stable
276 // across system clock changes. 276 // across system clock changes.
277 { 277 {
278 int64 tick_to_unix_time_ms = 278 int64_t tick_to_unix_time_ms =
279 (base::TimeTicks() - base::TimeTicks::UnixEpoch()).InMilliseconds(); 279 (base::TimeTicks() - base::TimeTicks::UnixEpoch()).InMilliseconds();
280 280
281 // Pass it as a string, since it may be too large to fit in an integer. 281 // Pass it as a string, since it may be too large to fit in an integer.
282 constants_dict->SetString("timeTickOffset", 282 constants_dict->SetString("timeTickOffset",
283 base::Int64ToString(tick_to_unix_time_ms)); 283 base::Int64ToString(tick_to_unix_time_ms));
284 } 284 }
285 285
286 // "clientInfo" key is required for some WriteToFileNetLogObserver log 286 // "clientInfo" key is required for some WriteToFileNetLogObserver log
287 // readers. Provide a default empty value for compatibility. 287 // readers. Provide a default empty value for compatibility.
288 constants_dict->Set("clientInfo", new base::DictionaryValue()); 288 constants_dict->Set("clientInfo", new base::DictionaryValue());
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 // fine, since GetRequestStateAsValue() ignores the capture mode. 522 // fine, since GetRequestStateAsValue() ignores the capture mode.
523 NetLog::EntryData entry_data( 523 NetLog::EntryData entry_data(
524 NetLog::TYPE_REQUEST_ALIVE, request->net_log().source(), 524 NetLog::TYPE_REQUEST_ALIVE, request->net_log().source(),
525 NetLog::PHASE_BEGIN, request->creation_time(), &callback); 525 NetLog::PHASE_BEGIN, request->creation_time(), &callback);
526 NetLog::Entry entry(&entry_data, NetLogCaptureMode::Default()); 526 NetLog::Entry entry(&entry_data, NetLogCaptureMode::Default());
527 observer->OnAddEntry(entry); 527 observer->OnAddEntry(entry);
528 } 528 }
529 } 529 }
530 530
531 } // namespace net 531 } // namespace net
OLDNEW
« no previous file with comments | « net/log/net_log_unittest.cc ('k') | net/log/test_net_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698