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/chrome_notification_types.h" |
9 #include "chrome/browser/content_settings/host_content_settings_map.h" | 10 #include "chrome/browser/content_settings/host_content_settings_map.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 11 #include "chrome/browser/extensions/extension_service.h" |
11 #include "chrome/browser/extensions/extension_system.h" | 12 #include "chrome/browser/extensions/extension_system.h" |
12 #include "chrome/browser/extensions/management_policy.h" | 13 #include "chrome/browser/extensions/management_policy.h" |
13 #include "chrome/browser/google/google_url_tracker.h" | 14 #include "chrome/browser/google/google_url_tracker.h" |
14 #include "chrome/browser/profile_resetter/brandcoded_default_settings.h" | 15 #include "chrome/browser/profile_resetter/brandcoded_default_settings.h" |
15 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" | 17 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" |
17 #include "chrome/browser/search_engines/template_url_service.h" | 18 #include "chrome/browser/search_engines/template_url_service.h" |
18 #include "chrome/browser/search_engines/template_url_service_factory.h" | 19 #include "chrome/browser/search_engines/template_url_service_factory.h" |
19 #include "chrome/browser/ui/browser.h" | 20 #include "chrome/browser/ui/browser.h" |
20 #include "chrome/browser/ui/browser_iterator.h" | 21 #include "chrome/browser/ui/browser_iterator.h" |
21 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 22 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
22 #include "chrome/common/chrome_notification_types.h" | |
23 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" |
24 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
25 #include "content/public/browser/notification_source.h" | 25 #include "content/public/browser/notification_source.h" |
26 | 26 |
27 ProfileResetter::ProfileResetter(Profile* profile) | 27 ProfileResetter::ProfileResetter(Profile* profile) |
28 : profile_(profile), | 28 : profile_(profile), |
29 template_url_service_(TemplateURLServiceFactory::GetForProfile(profile_)), | 29 template_url_service_(TemplateURLServiceFactory::GetForProfile(profile_)), |
30 pending_reset_flags_(0), | 30 pending_reset_flags_(0), |
31 cookies_remover_(NULL) { | 31 cookies_remover_(NULL) { |
32 DCHECK(CalledOnValidThread()); | 32 DCHECK(CalledOnValidThread()); |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 // TemplateURLService has loaded. If we need to clean search engines, it's | 253 // TemplateURLService has loaded. If we need to clean search engines, it's |
254 // time to go on. | 254 // time to go on. |
255 if (pending_reset_flags_ & DEFAULT_SEARCH_ENGINE) | 255 if (pending_reset_flags_ & DEFAULT_SEARCH_ENGINE) |
256 ResetDefaultSearchEngine(); | 256 ResetDefaultSearchEngine(); |
257 } | 257 } |
258 | 258 |
259 void ProfileResetter::OnBrowsingDataRemoverDone() { | 259 void ProfileResetter::OnBrowsingDataRemoverDone() { |
260 cookies_remover_ = NULL; | 260 cookies_remover_ = NULL; |
261 MarkAsDone(COOKIES_AND_SITE_DATA); | 261 MarkAsDone(COOKIES_AND_SITE_DATA); |
262 } | 262 } |
OLD | NEW |