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

Side by Side Diff: chrome/browser/history/top_sites_impl_unittest.cc

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 EXPECT_TRUE(IsTopSitesLoaded()); 903 EXPECT_TRUE(IsTopSitesLoaded());
904 904
905 // Make sure the data was migrated to top sites. 905 // Make sure the data was migrated to top sites.
906 ASSERT_NO_FATAL_FAILURE(MigrationAssertions()); 906 ASSERT_NO_FATAL_FAILURE(MigrationAssertions());
907 907
908 // We need to wait for top sites and history to finish processing requests. 908 // We need to wait for top sites and history to finish processing requests.
909 WaitForTopSites(); 909 WaitForTopSites();
910 WaitForHistory(); 910 WaitForHistory();
911 911
912 // Make sure there is no longer a Thumbnails file on disk. 912 // Make sure there is no longer a Thumbnails file on disk.
913 ASSERT_FALSE(file_util::PathExists( 913 ASSERT_FALSE(base::PathExists(
914 profile()->GetPath().Append(chrome::kThumbnailsFilename))); 914 profile()->GetPath().Append(chrome::kThumbnailsFilename)));
915 915
916 // Recreate top sites and make sure everything is still there. 916 // Recreate top sites and make sure everything is still there.
917 profile()->CreateHistoryService(false, false); 917 profile()->CreateHistoryService(false, false);
918 RecreateTopSitesAndBlock(); 918 RecreateTopSitesAndBlock();
919 919
920 ASSERT_NO_FATAL_FAILURE(MigrationAssertions()); 920 ASSERT_NO_FATAL_FAILURE(MigrationAssertions());
921 } 921 }
922 922
923 // Verifies that callbacks are notified correctly if requested before top sites 923 // Verifies that callbacks are notified correctly if requested before top sites
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 chrome::NOTIFICATION_TOP_SITES_LOADED, 1258 chrome::NOTIFICATION_TOP_SITES_LOADED,
1259 content::Source<Profile>(profile())); 1259 content::Source<Profile>(profile()));
1260 profile()->CreateTopSites(); 1260 profile()->CreateTopSites();
1261 HistoryServiceFactory::GetForProfile( 1261 HistoryServiceFactory::GetForProfile(
1262 profile(), Profile::EXPLICIT_ACCESS)->UnloadBackend(); 1262 profile(), Profile::EXPLICIT_ACCESS)->UnloadBackend();
1263 profile()->BlockUntilHistoryProcessesPendingRequests(); 1263 profile()->BlockUntilHistoryProcessesPendingRequests();
1264 observer.Wait(); 1264 observer.Wait();
1265 } 1265 }
1266 1266
1267 } // namespace history 1267 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/top_sites_database.cc ('k') | chrome/browser/history/top_sites_likely_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698