1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
7 template < typename > struct char_traits;
10 template < typename > class new_allocator {
14 template < typename _Tp > class allocator:__gnu_cxx::new_allocator < _Tp > {
17 typedef _Tp & const_reference;
18 template < typename > struct rebind {
19 typedef allocator other;
24 template < typename _Alloc > struct __alloc_traits {
25 typedef typename _Alloc::const_reference const_reference;
26 template < typename _Tp > struct rebind {
27 typedef typename _Alloc::template rebind < _Tp >::other other;
32 struct __numeric_limits_base {
34 template < typename _Tp > struct numeric_limits:__numeric_limits_base {
38 template < typename _Tp, typename _Alloc > struct _Vector_base {
39 typedef typename __gnu_cxx::__alloc_traits < _Alloc >::template rebind <
40 _Tp >::other _Tp_alloc_type;
42 template < typename _Tp, typename _Alloc = std::allocator < _Tp > >class vector:_Vector_base < _Tp,
45 typedef _Vector_base < _Tp, _Alloc > _Base;
46 typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
47 typedef __gnu_cxx::__alloc_traits < _Tp_alloc_type > _Alloc_traits;
50 typedef typename _Alloc_traits::const_reference const_reference;
51 typedef size_t size_type;
53 } const_reference operator[] (size_type) {
56 template < typename _CharT, typename =
57 char_traits < _CharT > >class basic_ostream;
58 typedef basic_ostream < int >ostream;
61 template < typename, typename > class basic_ios:ios_base {
63 template < typename _CharT, typename _Traits > class basic_ostream:basic_ios < _CharT,
68 typedef basic_ostream __ostream_type;
69 __ostream_type & operator<< (const void *) {
74 int GetMinLogLevel ();
75 typedef int LogSeverity;
76 LogSeverity LOG_ERROR_REPORT;
77 LogSeverity LOG_DCHECK;
80 LogMessage (const char *, int, LogSeverity);
81 std::ostream & stream () {
84 class LogMessageVoidify {
86 LogMessageVoidify () {
87 } void operator& (std::ostream &) {
95 class SupportsWeakPtrBase {
97 } template < typename T > class WeakPtr:internal::WeakPtrBase {
102 logging::LOG_DCHECK >=
103 logging::GetMinLogLevel () ? (void) 0 : logging::
104 LogMessageVoidify () & logging::
105 LogMessage ("../../base/memory/weak_ptr.h", 0,
106 logging::LOG_ERROR_REPORT).stream () << ". ";
109 template < class > class SupportsWeakPtr:internal::SupportsWeakPtrBase {
112 template < class ObserverType > class ObserverListBase:base::SupportsWeakPtr < ObserverListBase < ObserverType >
117 Iterator (ObserverListBase & list) :max_index_ (0 ? std::numeric_limits <
118 size_t >::max () : list.observers_.
122 ListType & observers = list_->observers_;
126 base::WeakPtr < ObserverListBase > list_;
139 template < class ObserverType, bool > class ObserverList:public ObserverListBase <
155 enum ConfigAvailability
162 OnProxyConfigChanged (const ProxyConfig &, ConfigAvailability) = 0;
170 ChromeProxyConfigService:
171 net::ProxyConfigService,
172 net::ProxyConfigService::Observer {
174 GetLatestProxyConfig (net::ProxyConfig *);
176 UpdateProxyConfig (ProxyPrefs::ConfigState, const net::ProxyConfig &);
178 OnProxyConfigChanged (const net::ProxyConfig &, ConfigAvailability);
180 net::ProxyConfigService::Observer,
185 ChromeProxyConfigService::UpdateProxyConfig (ProxyPrefs::ConfigState,
186 const net::ProxyConfig &) {
187 net::ProxyConfig new_config;
188 ConfigAvailability availability = GetLatestProxyConfig (0);
190 ProxyConfigService::Observer * obs;
191 obs->OnProxyConfigChanged (new_config, availability);
194 ChromeProxyConfigService::OnProxyConfigChanged (const net::ProxyConfig &,
197 net::ProxyConfig actual_config;
199 net::ProxyConfigService::Observer >::Iterator it (observers_);
201 ProxyConfigService::Observer * obs;
203 obs->OnProxyConfigChanged (actual_config, availability);