Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: chrome/browser/dom_ui/history_ui.cc

Issue 28281: Get rid of wstring variants of StringToFoo. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698