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

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

Issue 8477004: Have content/ create and destroy its own threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: With this patchset, Chrome runs and exits normally on Linux. Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // The history system runs on a background thread so that potentially slow 5 // The history system runs on a background thread so that potentially slow
6 // database operations don't delay the browser. This backend processing is 6 // database operations don't delay the browser. This backend processing is
7 // represented by HistoryBackend. The HistoryService's job is to dispatch to 7 // represented by HistoryBackend. The HistoryService's job is to dispatch to
8 // that thread. 8 // that thread.
9 // 9 //
10 // Main thread History thread 10 // Main thread History thread
(...skipping 12 matching lines...) Expand all
23 // (and favicons) 23 // (and favicons)
24 24
25 #include "chrome/browser/history/history.h" 25 #include "chrome/browser/history/history.h"
26 26
27 #include "base/callback.h" 27 #include "base/callback.h"
28 #include "base/memory/ref_counted.h" 28 #include "base/memory/ref_counted.h"
29 #include "base/message_loop.h" 29 #include "base/message_loop.h"
30 #include "base/path_service.h" 30 #include "base/path_service.h"
31 #include "base/string_util.h" 31 #include "base/string_util.h"
32 #include "base/task.h" 32 #include "base/task.h"
33 #include "base/threading/thread.h"
33 #include "chrome/browser/autocomplete/history_url_provider.h" 34 #include "chrome/browser/autocomplete/history_url_provider.h"
34 #include "chrome/browser/browser_process.h" 35 #include "chrome/browser/browser_process.h"
35 #include "chrome/browser/history/history_backend.h" 36 #include "chrome/browser/history/history_backend.h"
36 #include "chrome/browser/history/history_notifications.h" 37 #include "chrome/browser/history/history_notifications.h"
37 #include "chrome/browser/history/history_types.h" 38 #include "chrome/browser/history/history_types.h"
38 #include "chrome/browser/history/in_memory_database.h" 39 #include "chrome/browser/history/in_memory_database.h"
39 #include "chrome/browser/history/in_memory_history_backend.h" 40 #include "chrome/browser/history/in_memory_history_backend.h"
40 #include "chrome/browser/history/top_sites.h" 41 #include "chrome/browser/history/top_sites.h"
41 #include "chrome/browser/prefs/pref_service.h" 42 #include "chrome/browser/prefs/pref_service.h"
42 #include "chrome/browser/profiles/profile.h" 43 #include "chrome/browser/profiles/profile.h"
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 history::TopSites* ts = profile_->GetTopSitesWithoutCreating(); 845 history::TopSites* ts = profile_->GetTopSitesWithoutCreating();
845 if (ts) 846 if (ts)
846 ts->MigrateFromHistory(); 847 ts->MigrateFromHistory();
847 } 848 }
848 } 849 }
849 850
850 void HistoryService::OnTopSitesReady() { 851 void HistoryService::OnTopSitesReady() {
851 ScheduleAndForget(PRIORITY_NORMAL, 852 ScheduleAndForget(PRIORITY_NORMAL,
852 &HistoryBackend::MigrateThumbnailsDatabase); 853 &HistoryBackend::MigrateThumbnailsDatabase);
853 } 854 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698