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

Side by Side Diff: net/base/network_change_notifier.cc

Issue 10068035: Disable CHECK(false) in NetworkChangeNotifier::Create on ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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/base/network_change_notifier.h" 5 #include "net/base/network_change_notifier.h"
6 #include "net/base/network_change_notifier_factory.h" 6 #include "net/base/network_change_notifier_factory.h"
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #if defined(OS_WIN) 8 #if defined(OS_WIN)
9 #include "net/base/network_change_notifier_win.h" 9 #include "net/base/network_change_notifier_win.h"
10 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) 10 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 if (g_network_change_notifier_factory) 50 if (g_network_change_notifier_factory)
51 return g_network_change_notifier_factory->CreateInstance(); 51 return g_network_change_notifier_factory->CreateInstance();
52 52
53 #if defined(OS_WIN) 53 #if defined(OS_WIN)
54 NetworkChangeNotifierWin* network_change_notifier = 54 NetworkChangeNotifierWin* network_change_notifier =
55 new NetworkChangeNotifierWin(); 55 new NetworkChangeNotifierWin();
56 network_change_notifier->WatchForAddressChange(); 56 network_change_notifier->WatchForAddressChange();
57 return network_change_notifier; 57 return network_change_notifier;
58 #elif defined(OS_CHROMEOS) || defined(OS_ANDROID) 58 #elif defined(OS_CHROMEOS) || defined(OS_ANDROID)
59 // ChromeOS and Android builds MUST use their own class factory. 59 // ChromeOS and Android builds MUST use their own class factory.
60 #if !defined(OS_CHROMEOS)
61 // TODO(oshima): ash_shell do not have access to chromeos'es
62 // notifier yet. Re-enable this when chromeos'es notifier moved to
63 // chromeos root directory. crbug.com/119298.
60 CHECK(false); 64 CHECK(false);
65 #endif
61 return NULL; 66 return NULL;
62 #elif defined(OS_LINUX) 67 #elif defined(OS_LINUX)
63 return NetworkChangeNotifierLinux::Create(); 68 return NetworkChangeNotifierLinux::Create();
64 #elif defined(OS_MACOSX) 69 #elif defined(OS_MACOSX)
65 return new NetworkChangeNotifierMac(); 70 return new NetworkChangeNotifierMac();
66 #else 71 #else
67 NOTIMPLEMENTED(); 72 NOTIMPLEMENTED();
68 return NULL; 73 return NULL;
69 #endif 74 #endif
70 } 75 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 DCHECK(g_network_change_notifier); 168 DCHECK(g_network_change_notifier);
164 g_network_change_notifier = NULL; 169 g_network_change_notifier = NULL;
165 } 170 }
166 171
167 NetworkChangeNotifier::DisableForTest::~DisableForTest() { 172 NetworkChangeNotifier::DisableForTest::~DisableForTest() {
168 DCHECK(!g_network_change_notifier); 173 DCHECK(!g_network_change_notifier);
169 g_network_change_notifier = network_change_notifier_; 174 g_network_change_notifier = network_change_notifier_;
170 } 175 }
171 176
172 } // namespace net 177 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698