From 3deb16cc9c3938cbe4e496930ff428389f8b35d1 Mon Sep 17 00:00:00 2001 From: "viettrungluu@chromium.org" Date: Thu, 19 Aug 2010 16:12:07 +0000 Subject: Remove wstrings from bookmarks, part 3. Get rid of wstring BookmarkModel::AddGroup() (and convert lots of uses; also convert many uses of the wstring AddURL() as drive-by's). BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3115017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56689 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/bookmarks/bookmark_drag_data_unittest.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'chrome/browser/bookmarks/bookmark_drag_data_unittest.cc') diff --git a/chrome/browser/bookmarks/bookmark_drag_data_unittest.cc b/chrome/browser/bookmarks/bookmark_drag_data_unittest.cc index 55fc3b59..d9bf74d 100644 --- a/chrome/browser/bookmarks/bookmark_drag_data_unittest.cc +++ b/chrome/browser/bookmarks/bookmark_drag_data_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,6 +6,7 @@ #include "app/os_exchange_data_provider_win.h" #include "base/message_loop.h" #include "base/scoped_ptr.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/bookmarks/bookmark_drag_data.h" #include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/chrome_thread.h" @@ -118,9 +119,9 @@ TEST_F(BookmarkDragDataTest, Group) { profile.SetID(L"id"); BookmarkModel* model = profile.GetBookmarkModel(); const BookmarkNode* root = model->GetBookmarkBarNode(); - const BookmarkNode* g1 = model->AddGroup(root, 0, L"g1"); - const BookmarkNode* g11 = model->AddGroup(g1, 0, L"g11"); - const BookmarkNode* g12 = model->AddGroup(g1, 0, L"g12"); + const BookmarkNode* g1 = model->AddGroup(root, 0, ASCIIToUTF16("g1")); + const BookmarkNode* g11 = model->AddGroup(g1, 0, ASCIIToUTF16("g11")); + const BookmarkNode* g12 = model->AddGroup(g1, 0, ASCIIToUTF16("g12")); BookmarkDragData drag_data(g12); EXPECT_TRUE(drag_data.is_valid()); @@ -157,7 +158,7 @@ TEST_F(BookmarkDragDataTest, GroupWithChild) { profile.BlockUntilBookmarkModelLoaded(); BookmarkModel* model = profile.GetBookmarkModel(); const BookmarkNode* root = model->GetBookmarkBarNode(); - const BookmarkNode* group = model->AddGroup(root, 0, L"g1"); + const BookmarkNode* group = model->AddGroup(root, 0, ASCIIToUTF16("g1")); GURL url(GURL("http://foo.com")); const std::wstring title(L"blah2"); @@ -196,7 +197,7 @@ TEST_F(BookmarkDragDataTest, MultipleNodes) { profile.BlockUntilBookmarkModelLoaded(); BookmarkModel* model = profile.GetBookmarkModel(); const BookmarkNode* root = model->GetBookmarkBarNode(); - const BookmarkNode* group = model->AddGroup(root, 0, L"g1"); + const BookmarkNode* group = model->AddGroup(root, 0, ASCIIToUTF16("g1")); GURL url(GURL("http://foo.com")); const std::wstring title(L"blah2"); -- cgit v1.1