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

Side by Side Diff: content/renderer/media/webrtc/stun_field_trial.cc

Issue 1875913002: Cleanup: Convert const char* kFoo to const char kFoo[]. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « content/renderer/media/rtc_video_encoder.cc ('k') | ui/gfx/x/x11_atom_cache.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "content/renderer/media/webrtc/stun_field_trial.h" 5 #include "content/renderer/media/webrtc/stun_field_trial.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 22 matching lines...) Expand all
33 // This needs to be the same as NatTypeCounters in histograms.xml. 33 // This needs to be the same as NatTypeCounters in histograms.xml.
34 enum NatType { 34 enum NatType {
35 NAT_TYPE_NONE, 35 NAT_TYPE_NONE,
36 NAT_TYPE_UNKNOWN, 36 NAT_TYPE_UNKNOWN,
37 NAT_TYPE_SYMMETRIC, 37 NAT_TYPE_SYMMETRIC,
38 NAT_TYPE_NON_SYMMETRIC, 38 NAT_TYPE_NON_SYMMETRIC,
39 NAT_TYPE_MAX 39 NAT_TYPE_MAX
40 }; 40 };
41 41
42 // This needs to match "NatType" in histograms.xml. 42 // This needs to match "NatType" in histograms.xml.
43 const char* NatTypeNames[] = {"NoNAT", "UnknownNAT", "SymNAT", "NonSymNAT"}; 43 const char* const NatTypeNames[] =
44 {"NoNAT", "UnknownNAT", "SymNAT", "NonSymNAT"};
44 static_assert(arraysize(NatTypeNames) == NAT_TYPE_MAX, 45 static_assert(arraysize(NatTypeNames) == NAT_TYPE_MAX,
45 "NatType enums must match names"); 46 "NatType enums must match names");
46 47
47 NatType GetNatType(stunprober::NatType nat_type) { 48 NatType GetNatType(stunprober::NatType nat_type) {
48 switch (nat_type) { 49 switch (nat_type) {
49 case stunprober::NATTYPE_NONE: 50 case stunprober::NATTYPE_NONE:
50 return NAT_TYPE_NONE; 51 return NAT_TYPE_NONE;
51 case stunprober::NATTYPE_UNKNOWN: 52 case stunprober::NATTYPE_UNKNOWN:
52 return NAT_TYPE_UNKNOWN; 53 return NAT_TYPE_UNKNOWN;
53 case stunprober::NATTYPE_SYMMETRIC: 54 case stunprober::NATTYPE_SYMMETRIC:
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 void StunProberTrial::OnTimer() { 304 void StunProberTrial::OnTimer() {
304 DCHECK(thread_checker_.CalledOnValidThread()); 305 DCHECK(thread_checker_.CalledOnValidThread());
305 probers_[started_probers_]->Start(this); 306 probers_[started_probers_]->Start(this);
306 started_probers_++; 307 started_probers_++;
307 308
308 if (started_probers_ == total_probers_) 309 if (started_probers_ == total_probers_)
309 timer_.Stop(); 310 timer_.Stop();
310 } 311 }
311 312
312 } // namespace content 313 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/rtc_video_encoder.cc ('k') | ui/gfx/x/x11_atom_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698