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

Side by Side Diff: net/tools/gdig/file_net_log.cc

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
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 #include <stdio.h> 5 #include <stdio.h>
6 6
7 #include "base/json/json_string_value_serializer.h" 7 #include "base/json/json_string_value_serializer.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 22 matching lines...) Expand all
33 JSONStringValueSerializer serializer(&params); 33 JSONStringValueSerializer serializer(&params);
34 bool ret = serializer.Serialize(*param_value); 34 bool ret = serializer.Serialize(*param_value);
35 DCHECK(ret); 35 DCHECK(ret);
36 } 36 }
37 base::Time now = base::Time::NowFromSystemTime(); 37 base::Time now = base::Time::NowFromSystemTime();
38 base::AutoLock lock(lock_); 38 base::AutoLock lock(lock_);
39 if (first_event_time_.is_null()) { 39 if (first_event_time_.is_null()) {
40 first_event_time_ = now; 40 first_event_time_ = now;
41 } 41 }
42 base::TimeDelta elapsed_time = now - first_event_time_; 42 base::TimeDelta elapsed_time = now - first_event_time_;
43 fprintf(destination_ , "%u\t%u\t%s\t%s\t%s\n", 43 fprintf(destination_,
44 "%u\t%u\t%s\t%s\t%s\n",
44 static_cast<unsigned>(elapsed_time.InMilliseconds()), 45 static_cast<unsigned>(elapsed_time.InMilliseconds()),
45 entry.source().id, source, type, params.c_str()); 46 entry.source().id,
47 source,
48 type,
49 params.c_str());
46 } 50 }
47 51
48 } // namespace net 52 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698