OLD | NEW |
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 #include "chrome/browser/ui/webui/history_ui.h" | 5 #include "chrome/browser/ui/webui/history_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 HistoryUIHTMLSource* html_source = new HistoryUIHTMLSource(); | 391 HistoryUIHTMLSource* html_source = new HistoryUIHTMLSource(); |
392 | 392 |
393 // Set up the chrome://history/ source. | 393 // Set up the chrome://history/ source. |
394 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); | 394 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); |
395 profile->GetChromeURLDataManager()->AddDataSource(html_source); | 395 profile->GetChromeURLDataManager()->AddDataSource(html_source); |
396 } | 396 } |
397 | 397 |
398 // static | 398 // static |
399 const GURL HistoryUI::GetHistoryURLWithSearchText(const string16& text) { | 399 const GURL HistoryUI::GetHistoryURLWithSearchText(const string16& text) { |
400 return GURL(std::string(chrome::kChromeUIHistoryURL) + "#q=" + | 400 return GURL(std::string(chrome::kChromeUIHistoryURL) + "#q=" + |
401 EscapeQueryParamValue(UTF16ToUTF8(text), true)); | 401 net::EscapeQueryParamValue(UTF16ToUTF8(text), true)); |
402 } | 402 } |
403 | 403 |
404 // static | 404 // static |
405 RefCountedMemory* HistoryUI::GetFaviconResourceBytes() { | 405 RefCountedMemory* HistoryUI::GetFaviconResourceBytes() { |
406 return ResourceBundle::GetSharedInstance(). | 406 return ResourceBundle::GetSharedInstance(). |
407 LoadDataResourceBytes(IDR_HISTORY_FAVICON); | 407 LoadDataResourceBytes(IDR_HISTORY_FAVICON); |
408 } | 408 } |
OLD | NEW |