OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/history/android/android_provider_backend.h" | 5 #include "chrome/browser/history/android/android_provider_backend.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| 11 #include "base/files/scoped_temp_dir.h" |
11 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
12 #include "base/scoped_temp_dir.h" | |
13 #include "base/stringprintf.h" | 13 #include "base/stringprintf.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
15 #include "chrome/browser/api/bookmarks/bookmark_service.h" | 15 #include "chrome/browser/api/bookmarks/bookmark_service.h" |
16 #include "chrome/browser/bookmarks/bookmark_model.h" | 16 #include "chrome/browser/bookmarks/bookmark_model.h" |
17 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 17 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
18 #include "chrome/browser/history/android/android_time.h" | 18 #include "chrome/browser/history/android/android_time.h" |
19 #include "chrome/browser/history/history_backend.h" | 19 #include "chrome/browser/history/history_backend.h" |
20 #include "chrome/browser/profiles/profile_manager.h" | 20 #include "chrome/browser/profiles/profile_manager.h" |
21 #include "chrome/common/chrome_constants.h" | 21 #include "chrome/common/chrome_constants.h" |
22 #include "chrome/common/chrome_notification_types.h" | 22 #include "chrome/common/chrome_notification_types.h" |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 row.favicon_id_ = statement.ColumnInt64(4); | 181 row.favicon_id_ = statement.ColumnInt64(4); |
182 rows->push_back(row); | 182 rows->push_back(row); |
183 } | 183 } |
184 return true; | 184 return true; |
185 } | 185 } |
186 | 186 |
187 AndroidProviderBackendDelegate delegate_; | 187 AndroidProviderBackendDelegate delegate_; |
188 scoped_refptr<HistoryBackend> history_backend_; | 188 scoped_refptr<HistoryBackend> history_backend_; |
189 HistoryDatabase history_db_; | 189 HistoryDatabase history_db_; |
190 ThumbnailDatabase thumbnail_db_; | 190 ThumbnailDatabase thumbnail_db_; |
191 ScopedTempDir temp_dir_; | 191 base::ScopedTempDir temp_dir_; |
192 FilePath android_cache_db_name_; | 192 FilePath android_cache_db_name_; |
193 FilePath history_db_name_; | 193 FilePath history_db_name_; |
194 FilePath thumbnail_db_name_; | 194 FilePath thumbnail_db_name_; |
195 | 195 |
196 TestingProfileManager profile_manager_; | 196 TestingProfileManager profile_manager_; |
197 BookmarkModel* bookmark_model_; | 197 BookmarkModel* bookmark_model_; |
198 MessageLoopForUI message_loop_; | 198 MessageLoopForUI message_loop_; |
199 content::TestBrowserThread ui_thread_; | 199 content::TestBrowserThread ui_thread_; |
200 content::TestBrowserThread file_thread_; | 200 content::TestBrowserThread file_thread_; |
201 | 201 |
(...skipping 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2094 update_args, &update_count)); | 2094 update_args, &update_count)); |
2095 // Verify notifications. | 2095 // Verify notifications. |
2096 EXPECT_FALSE(delegate_.deleted_details()); | 2096 EXPECT_FALSE(delegate_.deleted_details()); |
2097 ASSERT_TRUE(delegate_.modified_details()); | 2097 ASSERT_TRUE(delegate_.modified_details()); |
2098 ASSERT_EQ(1u, delegate_.modified_details()->changed_urls.size()); | 2098 ASSERT_EQ(1u, delegate_.modified_details()->changed_urls.size()); |
2099 // No favicon will be updated as thumbnail database is missing. | 2099 // No favicon will be updated as thumbnail database is missing. |
2100 EXPECT_FALSE(delegate_.favicon_details()); | 2100 EXPECT_FALSE(delegate_.favicon_details()); |
2101 } | 2101 } |
2102 | 2102 |
2103 } // namespace history | 2103 } // namespace history |
OLD | NEW |