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 "chrome/browser/browsing_data/browsing_data_helper.h" | 8 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
9 #include "chrome/browser/content_settings/host_content_settings_map.h" | 9 #include "chrome/browser/content_settings/host_content_settings_map.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
11 #include "chrome/browser/extensions/extension_system.h" | 11 #include "chrome/browser/extensions/extension_system.h" |
12 #include "chrome/browser/extensions/management_policy.h" | |
13 #include "chrome/browser/google/google_url_tracker.h" | 12 #include "chrome/browser/google/google_url_tracker.h" |
14 #include "chrome/browser/profile_resetter/brandcoded_default_settings.h" | 13 #include "chrome/browser/profile_resetter/brandcoded_default_settings.h" |
15 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/search_engines/search_terms_data.h" | 15 #include "chrome/browser/search_engines/search_terms_data.h" |
17 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" | 16 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" |
18 #include "chrome/browser/search_engines/template_url_service.h" | 17 #include "chrome/browser/search_engines/template_url_service.h" |
19 #include "chrome/browser/search_engines/template_url_service_factory.h" | 18 #include "chrome/browser/search_engines/template_url_service_factory.h" |
20 #include "chrome/browser/ui/browser.h" | 19 #include "chrome/browser/ui/browser.h" |
21 #include "chrome/browser/ui/browser_iterator.h" | 20 #include "chrome/browser/ui/browser_iterator.h" |
22 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 21 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
23 #include "chrome/common/pref_names.h" | 22 #include "chrome/common/pref_names.h" |
24 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
| 24 #include "extensions/browser/management_policy.h" |
25 | 25 |
26 ProfileResetter::ProfileResetter(Profile* profile) | 26 ProfileResetter::ProfileResetter(Profile* profile) |
27 : profile_(profile), | 27 : profile_(profile), |
28 template_url_service_(TemplateURLServiceFactory::GetForProfile(profile_)), | 28 template_url_service_(TemplateURLServiceFactory::GetForProfile(profile_)), |
29 pending_reset_flags_(0), | 29 pending_reset_flags_(0), |
30 cookies_remover_(NULL) { | 30 cookies_remover_(NULL) { |
31 DCHECK(CalledOnValidThread()); | 31 DCHECK(CalledOnValidThread()); |
32 DCHECK(profile_); | 32 DCHECK(profile_); |
33 } | 33 } |
34 | 34 |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 DCHECK(CalledOnValidThread()); | 255 DCHECK(CalledOnValidThread()); |
256 template_url_service_sub_.reset(); | 256 template_url_service_sub_.reset(); |
257 if (pending_reset_flags_ & DEFAULT_SEARCH_ENGINE) | 257 if (pending_reset_flags_ & DEFAULT_SEARCH_ENGINE) |
258 ResetDefaultSearchEngine(); | 258 ResetDefaultSearchEngine(); |
259 } | 259 } |
260 | 260 |
261 void ProfileResetter::OnBrowsingDataRemoverDone() { | 261 void ProfileResetter::OnBrowsingDataRemoverDone() { |
262 cookies_remover_ = NULL; | 262 cookies_remover_ = NULL; |
263 MarkAsDone(COOKIES_AND_SITE_DATA); | 263 MarkAsDone(COOKIES_AND_SITE_DATA); |
264 } | 264 } |
OLD | NEW |