OLD | NEW |
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/browser/search_engines/search_provider_install_data.h" | 5 #include "chrome/browser/search_engines/search_provider_install_data.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 class GoogleURLObserver : public content::NotificationObserver { | 98 class GoogleURLObserver : public content::NotificationObserver { |
99 public: | 99 public: |
100 GoogleURLObserver(Profile* profile, | 100 GoogleURLObserver(Profile* profile, |
101 GoogleURLChangeNotifier* change_notifier, | 101 GoogleURLChangeNotifier* change_notifier, |
102 int ui_death_notification, | 102 int ui_death_notification, |
103 const content::NotificationSource& ui_death_source); | 103 const content::NotificationSource& ui_death_source); |
104 | 104 |
105 // Implementation of content::NotificationObserver. | 105 // Implementation of content::NotificationObserver. |
106 virtual void Observe(int type, | 106 virtual void Observe(int type, |
107 const content::NotificationSource& source, | 107 const content::NotificationSource& source, |
108 const content::NotificationDetails& details); | 108 const content::NotificationDetails& details) OVERRIDE; |
109 | 109 |
110 private: | 110 private: |
111 virtual ~GoogleURLObserver() {} | 111 virtual ~GoogleURLObserver() {} |
112 | 112 |
113 scoped_refptr<GoogleURLChangeNotifier> change_notifier_; | 113 scoped_refptr<GoogleURLChangeNotifier> change_notifier_; |
114 content::NotificationRegistrar registrar_; | 114 content::NotificationRegistrar registrar_; |
115 | 115 |
116 DISALLOW_COPY_AND_ASSIGN(GoogleURLObserver); | 116 DISALLOW_COPY_AND_ASSIGN(GoogleURLObserver); |
117 }; | 117 }; |
118 | 118 |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 | 298 |
299 std::for_each(closure_queue.begin(), | 299 std::for_each(closure_queue.begin(), |
300 closure_queue.end(), | 300 closure_queue.end(), |
301 std::mem_fun_ref(&base::Closure::Run)); | 301 std::mem_fun_ref(&base::Closure::Run)); |
302 | 302 |
303 // Since we expect this request to be rare, clear out the information. This | 303 // Since we expect this request to be rare, clear out the information. This |
304 // also keeps the responses current as the search providers change. | 304 // also keeps the responses current as the search providers change. |
305 provider_map_.reset(); | 305 provider_map_.reset(); |
306 SetDefault(NULL); | 306 SetDefault(NULL); |
307 } | 307 } |
OLD | NEW |