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

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

Issue 10071032: RefCounted types should not have public destructors, chrome/browser/ part 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Implementation fixes Created 8 years, 7 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
« no previous file with comments | « chrome/browser/history/top_sites_extension_api.cc ('k') | chrome/browser/net/crl_set_fetcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/format_macros.h" 8 #include "base/format_macros.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/scoped_temp_dir.h" 10 #include "base/scoped_temp_dir.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 virtual bool RunOnDBThread(HistoryBackend* backend, HistoryDatabase* db) { 52 virtual bool RunOnDBThread(HistoryBackend* backend, HistoryDatabase* db) {
53 return true; 53 return true;
54 } 54 }
55 55
56 virtual void DoneRunOnMainThread() { 56 virtual void DoneRunOnMainThread() {
57 MessageLoop::current()->Quit(); 57 MessageLoop::current()->Quit();
58 } 58 }
59 59
60 private: 60 private:
61 virtual ~WaitForHistoryTask() {}
62
61 DISALLOW_COPY_AND_ASSIGN(WaitForHistoryTask); 63 DISALLOW_COPY_AND_ASSIGN(WaitForHistoryTask);
62 }; 64 };
63 65
64 // Used for querying top sites. Either runs sequentially, or runs a nested 66 // Used for querying top sites. Either runs sequentially, or runs a nested
65 // nested message loop until the response is complete. The later is used when 67 // nested message loop until the response is complete. The later is used when
66 // TopSites is queried before it finishes loading. 68 // TopSites is queried before it finishes loading.
67 class TopSitesQuerier { 69 class TopSitesQuerier {
68 public: 70 public:
69 TopSitesQuerier() : number_of_callbacks_(0), waiting_(false) {} 71 TopSitesQuerier() : number_of_callbacks_(0), waiting_(false) {}
70 72
(...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 ui_test_utils::WindowedNotificationObserver observer( 1236 ui_test_utils::WindowedNotificationObserver observer(
1235 chrome::NOTIFICATION_TOP_SITES_LOADED, 1237 chrome::NOTIFICATION_TOP_SITES_LOADED,
1236 content::Source<Profile>(profile())); 1238 content::Source<Profile>(profile()));
1237 profile()->CreateTopSites(); 1239 profile()->CreateTopSites();
1238 profile()->GetHistoryService(Profile::EXPLICIT_ACCESS)->UnloadBackend(); 1240 profile()->GetHistoryService(Profile::EXPLICIT_ACCESS)->UnloadBackend();
1239 profile()->BlockUntilHistoryProcessesPendingRequests(); 1241 profile()->BlockUntilHistoryProcessesPendingRequests();
1240 observer.Wait(); 1242 observer.Wait();
1241 } 1243 }
1242 1244
1243 } // namespace history 1245 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/top_sites_extension_api.cc ('k') | chrome/browser/net/crl_set_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698