| 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/template_url_service.h" | 5 #include "chrome/browser/search_engines/template_url_service.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/environment.h" | 10 #include "base/environment.h" |
| 11 #include "base/guid.h" | 11 #include "base/guid.h" |
| 12 #include "base/i18n/case_conversion.h" | 12 #include "base/i18n/case_conversion.h" |
| 13 #include "base/memory/scoped_vector.h" | 13 #include "base/memory/scoped_vector.h" |
| 14 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
| 15 #include "base/prefs/pref_service.h" |
| 15 #include "base/stl_util.h" | 16 #include "base/stl_util.h" |
| 16 #include "base/string_number_conversions.h" | 17 #include "base/string_number_conversions.h" |
| 17 #include "base/string_split.h" | 18 #include "base/string_split.h" |
| 18 #include "base/string_util.h" | 19 #include "base/string_util.h" |
| 19 #include "base/time.h" | 20 #include "base/time.h" |
| 20 #include "base/utf_string_conversions.h" | 21 #include "base/utf_string_conversions.h" |
| 21 #include "chrome/browser/google/google_url_tracker.h" | 22 #include "chrome/browser/google/google_url_tracker.h" |
| 22 #include "chrome/browser/history/history_notifications.h" | 23 #include "chrome/browser/history/history_notifications.h" |
| 23 #include "chrome/browser/history/history_service.h" | 24 #include "chrome/browser/history/history_service.h" |
| 24 #include "chrome/browser/history/history_service_factory.h" | 25 #include "chrome/browser/history/history_service_factory.h" |
| 25 #include "chrome/browser/net/url_fixer_upper.h" | 26 #include "chrome/browser/net/url_fixer_upper.h" |
| 26 #include "chrome/browser/prefs/pref_service.h" | |
| 27 #include "chrome/browser/profiles/profile.h" | 27 #include "chrome/browser/profiles/profile.h" |
| 28 #include "chrome/browser/rlz/rlz.h" | 28 #include "chrome/browser/rlz/rlz.h" |
| 29 #include "chrome/browser/search_engines/search_host_to_urls_map.h" | 29 #include "chrome/browser/search_engines/search_host_to_urls_map.h" |
| 30 #include "chrome/browser/search_engines/search_terms_data.h" | 30 #include "chrome/browser/search_engines/search_terms_data.h" |
| 31 #include "chrome/browser/search_engines/template_url.h" | 31 #include "chrome/browser/search_engines/template_url.h" |
| 32 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" | 32 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" |
| 33 #include "chrome/browser/search_engines/template_url_service_observer.h" | 33 #include "chrome/browser/search_engines/template_url_service_observer.h" |
| 34 #include "chrome/browser/search_engines/util.h" | 34 #include "chrome/browser/search_engines/util.h" |
| 35 #include "chrome/browser/webdata/web_data_service_factory.h" | 35 #include "chrome/browser/webdata/web_data_service_factory.h" |
| 36 #include "chrome/common/chrome_notification_types.h" | 36 #include "chrome/common/chrome_notification_types.h" |
| (...skipping 2487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2524 // TODO(mpcomplete): If we allow editing extension keywords, then those | 2524 // TODO(mpcomplete): If we allow editing extension keywords, then those |
| 2525 // should be persisted to disk and synced. | 2525 // should be persisted to disk and synced. |
| 2526 if (template_url->sync_guid().empty() && | 2526 if (template_url->sync_guid().empty() && |
| 2527 !template_url->IsExtensionKeyword()) { | 2527 !template_url->IsExtensionKeyword()) { |
| 2528 template_url->data_.sync_guid = base::GenerateGUID(); | 2528 template_url->data_.sync_guid = base::GenerateGUID(); |
| 2529 if (service_.get()) | 2529 if (service_.get()) |
| 2530 service_->UpdateKeyword(template_url->data()); | 2530 service_->UpdateKeyword(template_url->data()); |
| 2531 } | 2531 } |
| 2532 } | 2532 } |
| 2533 } | 2533 } |
| OLD | NEW |