Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Side by Side Diff: chrome/browser/history/android/android_provider_backend_unittest.cc

Issue 1128173005: Clean up ProfileManager interface. Base URL: https://chromium.googlesource.com/chromium/src@issue479309
Patch Set: sync Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 chrome::kInitialProfile); 181 chrome::kInitialProfile);
182 testing_profile->CreateBookmarkModel(true); 182 testing_profile->CreateBookmarkModel(true);
183 bookmark_model_ = BookmarkModelFactory::GetForProfile(testing_profile); 183 bookmark_model_ = BookmarkModelFactory::GetForProfile(testing_profile);
184 history_client_ = 184 history_client_ =
185 ChromeHistoryClientFactory::GetForProfile(testing_profile); 185 ChromeHistoryClientFactory::GetForProfile(testing_profile);
186 bookmarks::test::WaitForBookmarkModelToLoad(bookmark_model_); 186 bookmarks::test::WaitForBookmarkModelToLoad(bookmark_model_);
187 ASSERT_TRUE(bookmark_model_); 187 ASSERT_TRUE(bookmark_model_);
188 188
189 // Get the BookmarkModel from LastUsedProfile, this is the same way that 189 // Get the BookmarkModel from LastUsedProfile, this is the same way that
190 // how the BookmarkModelSQLHandler gets the BookmarkModel. 190 // how the BookmarkModelSQLHandler gets the BookmarkModel.
191 Profile* profile = ProfileManager::GetLastUsedProfile(); 191 Profile* profile = profile_manager_.GetLastUsedProfile();
192 ASSERT_TRUE(profile); 192 ASSERT_TRUE(profile);
193 193
194 // Setup the database directory and files. 194 // Setup the database directory and files.
195 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 195 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
196 196
197 history_db_name_ = temp_dir_.path().AppendASCII(kHistoryFilename); 197 history_db_name_ = temp_dir_.path().AppendASCII(kHistoryFilename);
198 thumbnail_db_name_ = temp_dir_.path().AppendASCII(kFaviconsFilename); 198 thumbnail_db_name_ = temp_dir_.path().AppendASCII(kFaviconsFilename);
199 android_cache_db_name_ = temp_dir_.path().AppendASCII( 199 android_cache_db_name_ = temp_dir_.path().AppendASCII(
200 "TestAndroidCache.db"); 200 "TestAndroidCache.db");
201 } 201 }
(...skipping 1948 matching lines...) Expand 10 before | Expand all | Expand 10 after
2150 update_args, &update_count)); 2150 update_args, &update_count));
2151 // Verify notifications. 2151 // Verify notifications.
2152 EXPECT_FALSE(notifier_.deleted_details()); 2152 EXPECT_FALSE(notifier_.deleted_details());
2153 ASSERT_TRUE(notifier_.modified_details()); 2153 ASSERT_TRUE(notifier_.modified_details());
2154 ASSERT_EQ(1u, notifier_.modified_details()->size()); 2154 ASSERT_EQ(1u, notifier_.modified_details()->size());
2155 // No favicon will be updated as thumbnail database is missing. 2155 // No favicon will be updated as thumbnail database is missing.
2156 EXPECT_FALSE(notifier_.favicon_changed()); 2156 EXPECT_FALSE(notifier_.favicon_changed());
2157 } 2157 }
2158 2158
2159 } // namespace history 2159 } // namespace history
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698