OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ |
6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ | 6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 string16 GetKeywordShortName(const string16& keyword, | 222 string16 GetKeywordShortName(const string16& keyword, |
223 bool* is_extension_keyword); | 223 bool* is_extension_keyword); |
224 | 224 |
225 // NotificationObserver method. TemplateURLService listens for three | 225 // NotificationObserver method. TemplateURLService listens for three |
226 // notification types: | 226 // notification types: |
227 // . NOTIFY_HISTORY_URL_VISITED: adds keyword search terms if the visit | 227 // . NOTIFY_HISTORY_URL_VISITED: adds keyword search terms if the visit |
228 // corresponds to a keyword. | 228 // corresponds to a keyword. |
229 // . NOTIFY_GOOGLE_URL_UPDATED: updates mapping for any keywords containing | 229 // . NOTIFY_GOOGLE_URL_UPDATED: updates mapping for any keywords containing |
230 // a google base url replacement term. | 230 // a google base url replacement term. |
231 // . PREF_CHANGED: checks whether the default search engine has changed. | 231 // . PREF_CHANGED: checks whether the default search engine has changed. |
232 virtual void Observe(NotificationType type, | 232 virtual void Observe(int type, |
233 const NotificationSource& source, | 233 const NotificationSource& source, |
234 const NotificationDetails& details); | 234 const NotificationDetails& details); |
235 | 235 |
236 Profile* profile() const { return profile_; } | 236 Profile* profile() const { return profile_; } |
237 | 237 |
238 void SetSearchEngineDialogSlot(int slot) { | 238 void SetSearchEngineDialogSlot(int slot) { |
239 search_engine_dialog_chosen_slot_ = slot; | 239 search_engine_dialog_chosen_slot_ = slot; |
240 } | 240 } |
241 | 241 |
242 int GetSearchEngineDialogSlot() const { | 242 int GetSearchEngineDialogSlot() const { |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 // List of extension IDs waiting for Load to have keywords registered. | 454 // List of extension IDs waiting for Load to have keywords registered. |
455 std::vector<std::string> pending_extension_ids_; | 455 std::vector<std::string> pending_extension_ids_; |
456 | 456 |
457 // Function returning current time in base::Time units. | 457 // Function returning current time in base::Time units. |
458 TimeProvider* time_provider_; | 458 TimeProvider* time_provider_; |
459 | 459 |
460 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); | 460 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); |
461 }; | 461 }; |
462 | 462 |
463 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ | 463 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ |
OLD | NEW |