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 <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 2024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2035 } | 2035 } |
2036 | 2036 |
2037 default_search_provider_source_ = source; | 2037 default_search_provider_source_ = source; |
2038 | 2038 |
2039 if (default_search_provider_ && | 2039 if (default_search_provider_ && |
2040 default_search_provider_->HasGoogleBaseURLs()) { | 2040 default_search_provider_->HasGoogleBaseURLs()) { |
2041 if (profile_) | 2041 if (profile_) |
2042 GoogleURLTracker::RequestServerCheck(profile_, false); | 2042 GoogleURLTracker::RequestServerCheck(profile_, false); |
2043 #if defined(ENABLE_RLZ) | 2043 #if defined(ENABLE_RLZ) |
2044 RLZTracker::RecordProductEvent(rlz_lib::CHROME, | 2044 RLZTracker::RecordProductEvent(rlz_lib::CHROME, |
2045 RLZTracker::CHROME_OMNIBOX, | 2045 RLZTracker::ChromeOmnibox(), |
2046 rlz_lib::SET_TO_GOOGLE); | 2046 rlz_lib::SET_TO_GOOGLE); |
2047 #endif | 2047 #endif |
2048 } | 2048 } |
2049 | 2049 |
2050 NotifyObservers(); | 2050 NotifyObservers(); |
2051 } | 2051 } |
2052 | 2052 |
2053 bool TemplateURLService::AddNoNotify(TemplateURL* template_url, | 2053 bool TemplateURLService::AddNoNotify(TemplateURL* template_url, |
2054 bool newly_adding) { | 2054 bool newly_adding) { |
2055 DCHECK(template_url); | 2055 DCHECK(template_url); |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2495 | 2495 |
2496 if (most_recently_intalled_default) { | 2496 if (most_recently_intalled_default) { |
2497 base::AutoReset<DefaultSearchChangeOrigin> change_origin( | 2497 base::AutoReset<DefaultSearchChangeOrigin> change_origin( |
2498 &dsp_change_origin_, DSP_CHANGE_OVERRIDE_SETTINGS_EXTENSION); | 2498 &dsp_change_origin_, DSP_CHANGE_OVERRIDE_SETTINGS_EXTENSION); |
2499 default_search_manager_.SetExtensionControlledDefaultSearchEngine( | 2499 default_search_manager_.SetExtensionControlledDefaultSearchEngine( |
2500 most_recently_intalled_default->data()); | 2500 most_recently_intalled_default->data()); |
2501 } else { | 2501 } else { |
2502 default_search_manager_.ClearExtensionControlledDefaultSearchEngine(); | 2502 default_search_manager_.ClearExtensionControlledDefaultSearchEngine(); |
2503 } | 2503 } |
2504 } | 2504 } |
OLD | NEW |