diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-05 00:05:08 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-05 00:05:08 +0000 |
commit | 0e30ef7b4eed575d9f4efd42ca23c18c7ca8bd6a (patch) | |
tree | 8c088e1f17834ca98961f006868886c32bd46062 /chrome/browser/history | |
parent | 66de4f091a069b7d34a1afc16d6f1429a2b65781 (diff) | |
download | chromium_src-0e30ef7b4eed575d9f4efd42ca23c18c7ca8bd6a.zip chromium_src-0e30ef7b4eed575d9f4efd42ca23c18c7ca8bd6a.tar.gz chromium_src-0e30ef7b4eed575d9f4efd42ca23c18c7ca8bd6a.tar.bz2 |
Move the "history is too new" dialog out of
chrome/browser/history/history.cc. Instead use a notification
that Browser picks up and delegates to BrowserWindow.
Include implementations for Windows, Linux GTK+, and Linux Views
(sorry, no mac impl).
Review URL: http://codereview.chromium.org/200023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25556 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history')
-rw-r--r-- | chrome/browser/history/history.cc | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/chrome/browser/history/history.cc b/chrome/browser/history/history.cc index 5cf61a9..8310c23 100644 --- a/chrome/browser/history/history.cc +++ b/chrome/browser/history/history.cc @@ -620,23 +620,9 @@ void HistoryService::SetInMemoryBackend( } void HistoryService::NotifyTooNew() { -#if defined(OS_WIN) - // Find the last browser window to display our message box from. - Browser* cur_browser = BrowserList::GetLastActive(); - // TODO(brettw): Do this some other way or beng will kick you. e.g. move to - // BrowserView. - HWND parent_hwnd = - reinterpret_cast<HWND>(cur_browser->window()->GetNativeHandle()); - HWND cur_hwnd = cur_browser ? parent_hwnd : NULL; - - std::wstring title = l10n_util::GetString(IDS_PRODUCT_NAME); - std::wstring message = l10n_util::GetString(IDS_PROFILE_TOO_NEW_ERROR); - MessageBox(cur_hwnd, message.c_str(), title.c_str(), - MB_OK | MB_ICONWARNING | MB_TOPMOST); -#else - // TODO(port): factor this out into platform-specific code. - NOTIMPLEMENTED(); -#endif + Source<HistoryService> source(this); + NotificationService::current()->Notify(NotificationType::HISTORY_TOO_NEW, + source, NotificationService::NoDetails()); } void HistoryService::DeleteURL(const GURL& url) { |