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 "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/string_piece.h" | 8 #include "base/string_piece.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/thread.h" | 10 #include "base/thread.h" |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 string_value->GetAsString(query); | 271 string_value->GetAsString(query); |
272 } | 272 } |
273 | 273 |
274 // Get search month. | 274 // Get search month. |
275 if (list_value->Get(1, &list_member) && | 275 if (list_value->Get(1, &list_member) && |
276 list_member->GetType() == Value::TYPE_STRING) { | 276 list_member->GetType() == Value::TYPE_STRING) { |
277 const StringValue* string_value = | 277 const StringValue* string_value = |
278 static_cast<const StringValue*>(list_member); | 278 static_cast<const StringValue*>(list_member); |
279 std::wstring wstring_value; | 279 std::wstring wstring_value; |
280 string_value->GetAsString(&wstring_value); | 280 string_value->GetAsString(&wstring_value); |
281 *month = StringToInt(wstring_value); | 281 *month = StringToInt(WideToUTF16Hack(wstring_value)); |
282 } | 282 } |
283 } | 283 } |
284 } | 284 } |
285 | 285 |
286 history::QueryOptions BrowsingHistoryHandler::CreateMonthQueryOptions( | 286 history::QueryOptions BrowsingHistoryHandler::CreateMonthQueryOptions( |
287 int month) { | 287 int month) { |
288 history::QueryOptions options; | 288 history::QueryOptions options; |
289 | 289 |
290 // Configure the begin point of the search to the start of the | 290 // Configure the begin point of the search to the start of the |
291 // current month. | 291 // current month. |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 url += kHistoryHost; | 366 url += kHistoryHost; |
367 return GURL(url); | 367 return GURL(url); |
368 } | 368 } |
369 | 369 |
370 // static | 370 // static |
371 const GURL HistoryUI::GetHistoryURLWithSearchText( | 371 const GURL HistoryUI::GetHistoryURLWithSearchText( |
372 const std::wstring& text) { | 372 const std::wstring& text) { |
373 return GURL(GetBaseURL().spec() + "/?q=" + | 373 return GURL(GetBaseURL().spec() + "/?q=" + |
374 EscapeQueryParamValue(WideToUTF8(text))); | 374 EscapeQueryParamValue(WideToUTF8(text))); |
375 } | 375 } |
OLD | NEW |