| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/profile_resetter/profile_resetter.h" | 5 #include "chrome/browser/profile_resetter/profile_resetter.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "base/synchronization/cancellation_flag.h" | 8 #include "base/synchronization/cancellation_flag.h" |
| 9 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 9 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
| 10 #include "chrome/browser/content_settings/host_content_settings_map.h" | 10 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 update->Swap(search_engines.get()); | 163 update->Swap(search_engines.get()); |
| 164 } | 164 } |
| 165 | 165 |
| 166 template_url_service_->RepairPrepopulatedSearchEngines(); | 166 template_url_service_->RepairPrepopulatedSearchEngines(); |
| 167 | 167 |
| 168 // Reset Google search URL. | 168 // Reset Google search URL. |
| 169 prefs->ClearPref(prefs::kLastPromptedGoogleURL); | 169 prefs->ClearPref(prefs::kLastPromptedGoogleURL); |
| 170 const TemplateURL* default_search_provider = | 170 const TemplateURL* default_search_provider = |
| 171 template_url_service_->GetDefaultSearchProvider(); | 171 template_url_service_->GetDefaultSearchProvider(); |
| 172 if (default_search_provider && | 172 if (default_search_provider && |
| 173 default_search_provider->url_ref().HasGoogleBaseURLs()) | 173 default_search_provider->HasGoogleBaseURLs()) |
| 174 GoogleURLTracker::RequestServerCheck(profile_, true); | 174 GoogleURLTracker::RequestServerCheck(profile_, true); |
| 175 | 175 |
| 176 MarkAsDone(DEFAULT_SEARCH_ENGINE); | 176 MarkAsDone(DEFAULT_SEARCH_ENGINE); |
| 177 } else { | 177 } else { |
| 178 template_url_service_sub_ = | 178 template_url_service_sub_ = |
| 179 template_url_service_->RegisterOnLoadedCallback( | 179 template_url_service_->RegisterOnLoadedCallback( |
| 180 base::Bind(&ProfileResetter::OnTemplateURLServiceLoaded, | 180 base::Bind(&ProfileResetter::OnTemplateURLServiceLoaded, |
| 181 weak_ptr_factory_.GetWeakPtr())); | 181 weak_ptr_factory_.GetWeakPtr())); |
| 182 template_url_service_->Load(); | 182 template_url_service_->Load(); |
| 183 } | 183 } |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 chrome_exe, | 337 chrome_exe, |
| 338 false, | 338 false, |
| 339 cancel, | 339 cancel, |
| 340 &shortcuts); | 340 &shortcuts); |
| 341 } | 341 } |
| 342 return shortcuts; | 342 return shortcuts; |
| 343 #else | 343 #else |
| 344 return std::vector<ShortcutCommand>(); | 344 return std::vector<ShortcutCommand>(); |
| 345 #endif | 345 #endif |
| 346 } | 346 } |
| OLD | NEW |