1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3 /* { dg-additional-options "-Wno-return-type" } */
8 template < typename > struct char_traits;
11 template < typename > class new_allocator {
15 template < typename _Tp > class allocator:__gnu_cxx::new_allocator < _Tp > {
18 typedef _Tp & const_reference;
19 template < typename > struct rebind {
20 typedef allocator other;
25 template < typename _Alloc > struct __alloc_traits {
26 typedef typename _Alloc::const_reference const_reference;
27 template < typename _Tp > struct rebind {
28 typedef typename _Alloc::template rebind < _Tp >::other other;
33 struct __numeric_limits_base {
35 template < typename _Tp > struct numeric_limits:__numeric_limits_base {
39 template < typename _Tp, typename _Alloc > struct _Vector_base {
40 typedef typename __gnu_cxx::__alloc_traits < _Alloc >::template rebind <
41 _Tp >::other _Tp_alloc_type;
43 template < typename _Tp, typename _Alloc = std::allocator < _Tp > >class vector:_Vector_base < _Tp,
46 typedef _Vector_base < _Tp, _Alloc > _Base;
47 typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
48 typedef __gnu_cxx::__alloc_traits < _Tp_alloc_type > _Alloc_traits;
51 typedef typename _Alloc_traits::const_reference const_reference;
52 typedef size_t size_type;
54 } const_reference operator[] (size_type) {
57 template < typename _CharT, typename =
58 char_traits < _CharT > >class basic_ostream;
59 typedef basic_ostream < int >ostream;
62 template < typename, typename > class basic_ios:ios_base {
64 template < typename _CharT, typename _Traits > class basic_ostream:basic_ios < _CharT,
69 typedef basic_ostream __ostream_type;
70 __ostream_type & operator<< (const void *) {
75 int GetMinLogLevel ();
76 typedef int LogSeverity;
77 LogSeverity LOG_ERROR_REPORT;
78 LogSeverity LOG_DCHECK;
81 LogMessage (const char *, int, LogSeverity);
82 std::ostream & stream () {
85 class LogMessageVoidify {
87 LogMessageVoidify () {
88 } void operator& (std::ostream &) {
96 class SupportsWeakPtrBase {
98 } template < typename T > class WeakPtr:internal::WeakPtrBase {
100 WeakPtr () :ptr_ () {
103 logging::LOG_DCHECK >=
104 logging::GetMinLogLevel () ? (void) 0 : logging::
105 LogMessageVoidify () & logging::
106 LogMessage ("../../base/memory/weak_ptr.h", 0,
107 logging::LOG_ERROR_REPORT).stream () << ". ";
110 template < class > class SupportsWeakPtr:internal::SupportsWeakPtrBase {
113 template < class ObserverType > class ObserverListBase:base::SupportsWeakPtr < ObserverListBase < ObserverType >
118 Iterator (ObserverListBase & list) :max_index_ (0 ? std::numeric_limits <
119 size_t >::max () : list.observers_.
123 ListType & observers = list_->observers_;
127 base::WeakPtr < ObserverListBase > list_;
140 template < class ObserverType, bool > class ObserverList:public ObserverListBase <
156 enum ConfigAvailability
163 OnProxyConfigChanged (const ProxyConfig &, ConfigAvailability) = 0;
171 ChromeProxyConfigService:
172 net::ProxyConfigService,
173 net::ProxyConfigService::Observer {
175 GetLatestProxyConfig (net::ProxyConfig *);
177 UpdateProxyConfig (ProxyPrefs::ConfigState, const net::ProxyConfig &);
179 OnProxyConfigChanged (const net::ProxyConfig &, ConfigAvailability);
181 net::ProxyConfigService::Observer,
186 ChromeProxyConfigService::UpdateProxyConfig (ProxyPrefs::ConfigState,
187 const net::ProxyConfig &) {
188 net::ProxyConfig new_config;
189 ConfigAvailability availability = GetLatestProxyConfig (0);
191 ProxyConfigService::Observer * obs;
192 obs->OnProxyConfigChanged (new_config, availability);
195 ChromeProxyConfigService::OnProxyConfigChanged (const net::ProxyConfig &,
198 net::ProxyConfig actual_config;
200 net::ProxyConfigService::Observer >::Iterator it (observers_);
202 ProxyConfigService::Observer * obs;
204 obs->OnProxyConfigChanged (actual_config, availability);