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

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

Issue 223143006: Make necessary changes for chromecast build as chromecast has it own implementation of NetworkChang… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove the use of CHROMECAST_BUILD macro. Use feature-based gyp variables and C macros to specify c… Created 6 years, 5 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 | « no previous file | net/net.gyp » ('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/base/network_change_notifier.h" 5 #include "net/base/network_change_notifier.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/synchronization/lock.h" 8 #include "base/synchronization/lock.h"
9 #include "base/threading/thread_checker.h" 9 #include "base/threading/thread_checker.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 // static 500 // static
501 NetworkChangeNotifier* NetworkChangeNotifier::Create() { 501 NetworkChangeNotifier* NetworkChangeNotifier::Create() {
502 if (g_network_change_notifier_factory) 502 if (g_network_change_notifier_factory)
503 return g_network_change_notifier_factory->CreateInstance(); 503 return g_network_change_notifier_factory->CreateInstance();
504 504
505 #if defined(OS_WIN) 505 #if defined(OS_WIN)
506 NetworkChangeNotifierWin* network_change_notifier = 506 NetworkChangeNotifierWin* network_change_notifier =
507 new NetworkChangeNotifierWin(); 507 new NetworkChangeNotifierWin();
508 network_change_notifier->WatchForAddressChange(); 508 network_change_notifier->WatchForAddressChange();
509 return network_change_notifier; 509 return network_change_notifier;
510 #elif defined(OS_CHROMEOS) || defined(OS_ANDROID) 510 #elif defined(USE_NETWORK_CHANGE_NOTIFIER_FACTORY)
511 // ChromeOS and Android builds MUST use their own class factory. 511 // Check that we never reach here for platforms/products that use their
512 // own class factory.
512 #if !defined(OS_CHROMEOS) 513 #if !defined(OS_CHROMEOS)
513 // TODO(oshima): ash_shell do not have access to chromeos'es 514 // TODO(oshima): ash_shell do not have access to chromeos'es
514 // notifier yet. Re-enable this when chromeos'es notifier moved to 515 // notifier yet. Re-enable this when chromeos'es notifier moved to
515 // chromeos root directory. crbug.com/119298. 516 // chromeos root directory. crbug.com/119298.
516 CHECK(false); 517 CHECK(false);
517 #endif 518 #endif
518 return NULL; 519 return NULL;
519 #elif defined(OS_LINUX) 520 #elif defined(OS_LINUX)
520 return NetworkChangeNotifierLinux::Create(); 521 return NetworkChangeNotifierLinux::Create();
521 #elif defined(OS_MACOSX) 522 #elif defined(OS_MACOSX)
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 DCHECK(g_network_change_notifier); 857 DCHECK(g_network_change_notifier);
857 g_network_change_notifier = NULL; 858 g_network_change_notifier = NULL;
858 } 859 }
859 860
860 NetworkChangeNotifier::DisableForTest::~DisableForTest() { 861 NetworkChangeNotifier::DisableForTest::~DisableForTest() {
861 DCHECK(!g_network_change_notifier); 862 DCHECK(!g_network_change_notifier);
862 g_network_change_notifier = network_change_notifier_; 863 g_network_change_notifier = network_change_notifier_;
863 } 864 }
864 865
865 } // namespace net 866 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698