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