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

Side by Side Diff: net/dns/dns_config_service_posix.cc

Issue 12310041: experiment with -Wimplicit-fallthrough Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase Created 6 years, 12 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/cert/cert_status_flags.cc ('k') | net/http/http_cache_transaction.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 #include "net/dns/dns_config_service_posix.h" 5 #include "net/dns/dns_config_service_posix.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 explicit ConfigReader(DnsConfigServicePosix* service) 259 explicit ConfigReader(DnsConfigServicePosix* service)
260 : service_(service), success_(false) {} 260 : service_(service), success_(false) {}
261 261
262 virtual void DoWork() OVERRIDE { 262 virtual void DoWork() OVERRIDE {
263 base::TimeTicks start_time = base::TimeTicks::Now(); 263 base::TimeTicks start_time = base::TimeTicks::Now();
264 ConfigParsePosixResult result = ReadDnsConfig(&dns_config_); 264 ConfigParsePosixResult result = ReadDnsConfig(&dns_config_);
265 switch (result) { 265 switch (result) {
266 case CONFIG_PARSE_POSIX_MISSING_OPTIONS: 266 case CONFIG_PARSE_POSIX_MISSING_OPTIONS:
267 case CONFIG_PARSE_POSIX_UNHANDLED_OPTIONS: 267 case CONFIG_PARSE_POSIX_UNHANDLED_OPTIONS:
268 DCHECK(dns_config_.unhandled_options); 268 DCHECK(dns_config_.unhandled_options);
269 // Fall through. 269 FALLTHROUGH_INTENDED;
270 case CONFIG_PARSE_POSIX_OK: 270 case CONFIG_PARSE_POSIX_OK:
271 success_ = true; 271 success_ = true;
272 break; 272 break;
273 default: 273 default:
274 success_ = false; 274 success_ = false;
275 break; 275 break;
276 } 276 }
277 UMA_HISTOGRAM_ENUMERATION("AsyncDNS.ConfigParsePosix", 277 UMA_HISTOGRAM_ENUMERATION("AsyncDNS.ConfigParsePosix",
278 result, CONFIG_PARSE_POSIX_MAX); 278 result, CONFIG_PARSE_POSIX_MAX);
279 UMA_HISTOGRAM_BOOLEAN("AsyncDNS.ConfigParseResult", success_); 279 UMA_HISTOGRAM_BOOLEAN("AsyncDNS.ConfigParseResult", success_);
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 virtual void ReadNow() OVERRIDE {} 500 virtual void ReadNow() OVERRIDE {}
501 virtual bool StartWatching() OVERRIDE { return false; } 501 virtual bool StartWatching() OVERRIDE { return false; }
502 }; 502 };
503 // static 503 // static
504 scoped_ptr<DnsConfigService> DnsConfigService::CreateSystemService() { 504 scoped_ptr<DnsConfigService> DnsConfigService::CreateSystemService() {
505 return scoped_ptr<DnsConfigService>(new StubDnsConfigService()); 505 return scoped_ptr<DnsConfigService>(new StubDnsConfigService());
506 } 506 }
507 #endif 507 #endif
508 508
509 } // namespace net 509 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/cert_status_flags.cc ('k') | net/http/http_cache_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698