| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 | 371 |
| 372 // Notify the page that the deletion request succeeded. | 372 // Notify the page that the deletion request succeeded. |
| 373 web_ui()->CallJavascriptFunction("deleteComplete"); | 373 web_ui()->CallJavascriptFunction("deleteComplete"); |
| 374 } | 374 } |
| 375 | 375 |
| 376 void BrowsingHistoryHandler::ExtractSearchHistoryArguments( | 376 void BrowsingHistoryHandler::ExtractSearchHistoryArguments( |
| 377 const ListValue* args, | 377 const ListValue* args, |
| 378 int* month, | 378 int* month, |
| 379 string16* query) { | 379 string16* query) { |
| 380 *month = 0; | 380 *month = 0; |
| 381 Value* list_member; | 381 const Value* list_member; |
| 382 | 382 |
| 383 // Get search string. | 383 // Get search string. |
| 384 if (args->Get(0, &list_member) && | 384 if (args->Get(0, &list_member) && |
| 385 list_member->GetType() == Value::TYPE_STRING) { | 385 list_member->GetType() == Value::TYPE_STRING) { |
| 386 const StringValue* string_value = | 386 const StringValue* string_value = |
| 387 static_cast<const StringValue*>(list_member); | 387 static_cast<const StringValue*>(list_member); |
| 388 string_value->GetAsString(query); | 388 string_value->GetAsString(query); |
| 389 } | 389 } |
| 390 | 390 |
| 391 // Get search month. | 391 // Get search month. |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 return GURL(std::string(chrome::kChromeUIHistoryURL) + "#q=" + | 493 return GURL(std::string(chrome::kChromeUIHistoryURL) + "#q=" + |
| 494 net::EscapeQueryParamValue(UTF16ToUTF8(text), true)); | 494 net::EscapeQueryParamValue(UTF16ToUTF8(text), true)); |
| 495 } | 495 } |
| 496 | 496 |
| 497 // static | 497 // static |
| 498 base::RefCountedMemory* HistoryUI::GetFaviconResourceBytes() { | 498 base::RefCountedMemory* HistoryUI::GetFaviconResourceBytes() { |
| 499 return ResourceBundle::GetSharedInstance(). | 499 return ResourceBundle::GetSharedInstance(). |
| 500 LoadDataResourceBytes(IDR_HISTORY_FAVICON, | 500 LoadDataResourceBytes(IDR_HISTORY_FAVICON, |
| 501 ui::SCALE_FACTOR_100P); | 501 ui::SCALE_FACTOR_100P); |
| 502 } | 502 } |
| OLD | NEW |