Chromium Code Reviews| Index: chrome/browser/history/shortcuts_backend.cc |
| =================================================================== |
| --- chrome/browser/history/shortcuts_backend.cc (revision 145147) |
| +++ chrome/browser/history/shortcuts_backend.cc (working copy) |
| @@ -81,11 +81,11 @@ |
| // ShortcutsBackend ----------------------------------------------------------- |
| -ShortcutsBackend::ShortcutsBackend(const FilePath& db_folder_path, |
| - Profile *profile) |
| +ShortcutsBackend::ShortcutsBackend(Profile* profile, bool suppress_db) |
| : current_state_(NOT_INITIALIZED), |
| - db_(new ShortcutsDatabase(db_folder_path)), |
| - no_db_access_(db_folder_path.empty()) { |
| + no_db_access_(suppress_db) { |
| + if (!suppress_db) |
| + db_ = new ShortcutsDatabase(profile); |
| // |profile| can be NULL in tests. |
| if (profile) { |
| notification_registrar_.Add(this, chrome::NOTIFICATION_OMNIBOX_OPENED_URL, |
| @@ -264,4 +264,10 @@ |
| match.description_class, base::Time::Now(), 1)); |
| } |
| +void ShortcutsBackend::ShutdownOnUIThread() { |
| + DCHECK(!BrowserThread::IsWellKnownThread(BrowserThread::UI) || |
| + BrowserThread::CurrentlyOn(BrowserThread::UI)); |
|
Miranda Callahan
2012/07/03 15:23:41
hmm, I am again confused -- is this really DCHECKi
mrossetti
2012/07/03 16:42:29
That is correct! ;^)
The IsWellKnownThread test t
|
| + notification_registrar_.RemoveAll(); |
| +} |
| + |
| } // namespace history |