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/json/json_string_value_serializer.h" | 7 #include "base/json/json_string_value_serializer.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/test/scoped_path_override.h" | 10 #include "base/test/scoped_path_override.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 } | 144 } |
145 | 145 |
146 // static | 146 // static |
147 KeyedService* ProfileResetterTest::CreateTemplateURLService( | 147 KeyedService* ProfileResetterTest::CreateTemplateURLService( |
148 content::BrowserContext* context) { | 148 content::BrowserContext* context) { |
149 Profile* profile = static_cast<Profile*>(context); | 149 Profile* profile = static_cast<Profile*>(context); |
150 return new TemplateURLService( | 150 return new TemplateURLService( |
151 profile->GetPrefs(), | 151 profile->GetPrefs(), |
152 scoped_ptr<SearchTermsData>(new UIThreadSearchTermsData(profile)), | 152 scoped_ptr<SearchTermsData>(new UIThreadSearchTermsData(profile)), |
153 WebDataServiceFactory::GetKeywordWebDataForProfile( | 153 WebDataServiceFactory::GetKeywordWebDataForProfile( |
154 profile, Profile::EXPLICIT_ACCESS), | 154 profile, ServiceAccessType::EXPLICIT_ACCESS), |
155 scoped_ptr<TemplateURLServiceClient>(), NULL, NULL, base::Closure()); | 155 scoped_ptr<TemplateURLServiceClient>(), NULL, NULL, base::Closure()); |
156 } | 156 } |
157 | 157 |
158 | 158 |
159 // PinnedTabsResetTest -------------------------------------------------------- | 159 // PinnedTabsResetTest -------------------------------------------------------- |
160 | 160 |
161 class PinnedTabsResetTest : public BrowserWithTestWindowTest, | 161 class PinnedTabsResetTest : public BrowserWithTestWindowTest, |
162 public ProfileResetterTestBase { | 162 public ProfileResetterTestBase { |
163 protected: | 163 protected: |
164 void SetUp() override; | 164 void SetUp() override; |
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 new ResettableSettingsSnapshot(profile())); | 1085 new ResettableSettingsSnapshot(profile())); |
1086 deleted_snapshot->RequestShortcuts(base::Bind(&FeedbackCapture::Fail, | 1086 deleted_snapshot->RequestShortcuts(base::Bind(&FeedbackCapture::Fail, |
1087 base::Unretained(&capture))); | 1087 base::Unretained(&capture))); |
1088 deleted_snapshot.reset(); | 1088 deleted_snapshot.reset(); |
1089 // Running remaining tasks shouldn't trigger the callback to be called as | 1089 // Running remaining tasks shouldn't trigger the callback to be called as |
1090 // |deleted_snapshot| was deleted before it could run. | 1090 // |deleted_snapshot| was deleted before it could run. |
1091 base::MessageLoop::current()->RunUntilIdle(); | 1091 base::MessageLoop::current()->RunUntilIdle(); |
1092 } | 1092 } |
1093 | 1093 |
1094 } // namespace | 1094 } // namespace |
OLD | NEW |