Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Side by Side Diff: components/search_engines/template_url_service.cc

Issue 651193002: Remove NOTIFICATION_HISTORY_URL_VISITED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@373326.2
Patch Set: Address comments Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/search_engines/template_url_service.h" 5 #include "components/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 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 } 948 }
949 949
950 void TemplateURLService::OnHistoryURLVisited(const URLVisitedDetails& details) { 950 void TemplateURLService::OnHistoryURLVisited(const URLVisitedDetails& details) {
951 if (!loaded_) 951 if (!loaded_)
952 visits_to_add_.push_back(details); 952 visits_to_add_.push_back(details);
953 else 953 else
954 UpdateKeywordSearchTermsForURL(details); 954 UpdateKeywordSearchTermsForURL(details);
955 } 955 }
956 956
957 void TemplateURLService::Shutdown() { 957 void TemplateURLService::Shutdown() {
958 if (client_)
959 client_->Shutdown();
958 // This check has to be done at Shutdown() instead of in the dtor to ensure 960 // This check has to be done at Shutdown() instead of in the dtor to ensure
959 // that no clients of KeywordWebDataService are holding ptrs to it after the 961 // that no clients of KeywordWebDataService are holding ptrs to it after the
960 // first phase of the KeyedService Shutdown() process. 962 // first phase of the KeyedService Shutdown() process.
961 if (load_handle_) { 963 if (load_handle_) {
962 DCHECK(web_data_service_.get()); 964 DCHECK(web_data_service_.get());
963 web_data_service_->CancelRequest(load_handle_); 965 web_data_service_->CancelRequest(load_handle_);
964 } 966 }
965 web_data_service_ = NULL; 967 web_data_service_ = NULL;
966 } 968 }
967 969
(...skipping 1432 matching lines...) Expand 10 before | Expand all | Expand 10 after
2400 2402
2401 if (most_recently_intalled_default) { 2403 if (most_recently_intalled_default) {
2402 base::AutoReset<DefaultSearchChangeOrigin> change_origin( 2404 base::AutoReset<DefaultSearchChangeOrigin> change_origin(
2403 &dsp_change_origin_, DSP_CHANGE_OVERRIDE_SETTINGS_EXTENSION); 2405 &dsp_change_origin_, DSP_CHANGE_OVERRIDE_SETTINGS_EXTENSION);
2404 default_search_manager_.SetExtensionControlledDefaultSearchEngine( 2406 default_search_manager_.SetExtensionControlledDefaultSearchEngine(
2405 most_recently_intalled_default->data()); 2407 most_recently_intalled_default->data());
2406 } else { 2408 } else {
2407 default_search_manager_.ClearExtensionControlledDefaultSearchEngine(); 2409 default_search_manager_.ClearExtensionControlledDefaultSearchEngine();
2408 } 2410 }
2409 } 2411 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/test_with_browser_view.cc ('k') | components/search_engines/template_url_service_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698