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

Side by Side Diff: chrome/test/base/chrome_test_suite.cc

Issue 12226045: Linux/ChromeOS Chromium style checker cleanup, chrome/ edition part 1. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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 | « chrome/test/base/chrome_test_launcher.cc ('k') | chrome/test/base/module_system_test.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 "chrome/test/base/chrome_test_suite.h" 5 #include "chrome/test/base/chrome_test_suite.h"
6 6
7 #if defined(OS_CHROMEOS) 7 #if defined(OS_CHROMEOS)
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <unistd.h> 9 #include <unistd.h>
10 #endif 10 #endif
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // so this host resolver procedure catches external queries and returns a failed 83 // so this host resolver procedure catches external queries and returns a failed
84 // lookup result. 84 // lookup result.
85 class LocalHostResolverProc : public net::HostResolverProc { 85 class LocalHostResolverProc : public net::HostResolverProc {
86 public: 86 public:
87 LocalHostResolverProc() : HostResolverProc(NULL) {} 87 LocalHostResolverProc() : HostResolverProc(NULL) {}
88 88
89 virtual int Resolve(const std::string& host, 89 virtual int Resolve(const std::string& host,
90 net::AddressFamily address_family, 90 net::AddressFamily address_family,
91 net::HostResolverFlags host_resolver_flags, 91 net::HostResolverFlags host_resolver_flags,
92 net::AddressList* addrlist, 92 net::AddressList* addrlist,
93 int* os_error) { 93 int* os_error) OVERRIDE {
94 const char* kLocalHostNames[] = {"localhost", "127.0.0.1", "::1"}; 94 const char* kLocalHostNames[] = {"localhost", "127.0.0.1", "::1"};
95 bool local = false; 95 bool local = false;
96 96
97 if (host == net::GetHostName()) { 97 if (host == net::GetHostName()) {
98 local = true; 98 local = true;
99 } else { 99 } else {
100 for (size_t i = 0; i < arraysize(kLocalHostNames); i++) 100 for (size_t i = 0; i < arraysize(kLocalHostNames); i++)
101 if (host == kLocalHostNames[i]) { 101 if (host == kLocalHostNames[i]) {
102 local = true; 102 local = true;
103 break; 103 break;
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 #if defined(OS_MACOSX) && !defined(OS_IOS) 278 #if defined(OS_MACOSX) && !defined(OS_IOS)
279 base::mac::SetOverrideFrameworkBundle(NULL); 279 base::mac::SetOverrideFrameworkBundle(NULL);
280 #endif 280 #endif
281 281
282 base::StatsTable::set_current(NULL); 282 base::StatsTable::set_current(NULL);
283 stats_table_.reset(); 283 stats_table_.reset();
284 RemoveSharedMemoryFile(stats_filename_); 284 RemoveSharedMemoryFile(stats_filename_);
285 285
286 base::TestSuite::Shutdown(); 286 base::TestSuite::Shutdown();
287 } 287 }
OLDNEW
« no previous file with comments | « chrome/test/base/chrome_test_launcher.cc ('k') | chrome/test/base/module_system_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698