| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/browser/dom_ui/history_ui.h" | 5 #include "chrome/browser/dom_ui/history_ui.h" |
| 6 | 6 |
| 7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/string_piece.h" | 9 #include "base/string_piece.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 // | 360 // |
| 361 // HistoryUIContents | 361 // HistoryUIContents |
| 362 // | 362 // |
| 363 //////////////////////////////////////////////////////////////////////////////// | 363 //////////////////////////////////////////////////////////////////////////////// |
| 364 | 364 |
| 365 HistoryUI::HistoryUI(TabContents* contents) : DOMUI(contents) { | 365 HistoryUI::HistoryUI(TabContents* contents) : DOMUI(contents) { |
| 366 AddMessageHandler(new BrowsingHistoryHandler(this)); | 366 AddMessageHandler(new BrowsingHistoryHandler(this)); |
| 367 | 367 |
| 368 HistoryUIHTMLSource* html_source = new HistoryUIHTMLSource(); | 368 HistoryUIHTMLSource* html_source = new HistoryUIHTMLSource(); |
| 369 | 369 |
| 370 // Set up the chrome-ui://history/ source. | 370 // Set up the chrome://history/ source. |
| 371 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, | 371 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, |
| 372 NewRunnableMethod(&chrome_url_data_manager, | 372 NewRunnableMethod(&chrome_url_data_manager, |
| 373 &ChromeURLDataManager::AddDataSource, | 373 &ChromeURLDataManager::AddDataSource, |
| 374 html_source)); | 374 html_source)); |
| 375 } | 375 } |
| 376 | 376 |
| 377 // static | 377 // static |
| 378 const GURL HistoryUI::GetHistoryURLWithSearchText(const std::wstring& text) { | 378 const GURL HistoryUI::GetHistoryURLWithSearchText(const std::wstring& text) { |
| 379 return GURL(std::string(chrome::kChromeUIHistoryURL) + "#q=" + | 379 return GURL(std::string(chrome::kChromeUIHistoryURL) + "#q=" + |
| 380 EscapeQueryParamValue(WideToUTF8(text))); | 380 EscapeQueryParamValue(WideToUTF8(text))); |
| 381 } | 381 } |
| OLD | NEW |