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

Unified Diff: chrome/browser/bookmarks/bookmark_drag_data.cc

Issue 549224: Support reordering of Browser Actions within the container. Currently does no... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/bookmarks/bookmark_drag_data.h ('k') | chrome/browser/extensions/extension_toolbar_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bookmarks/bookmark_drag_data.cc
===================================================================
--- chrome/browser/bookmarks/bookmark_drag_data.cc (revision 37723)
+++ chrome/browser/bookmarks/bookmark_drag_data.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 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.
@@ -190,16 +190,8 @@
#endif
void BookmarkDragData::WriteToPickle(Profile* profile, Pickle* pickle) const {
-#if defined(WCHAR_T_IS_UTF16)
- pickle->WriteWString(
- profile ? profile->GetPath().ToWStringHack() : std::wstring());
-#elif defined(WCHAR_T_IS_UTF32)
- pickle->WriteString(
- profile ? profile->GetPath().value() : std::string());
-#else
- NOTIMPLEMENTED() << "Impossible encoding situation!";
-#endif
-
+ FilePath path = profile ? profile->GetPath() : FilePath();
+ FilePath::WriteStringTypeToPickle(pickle, path.value());
pickle->WriteSize(elements.size());
for (size_t i = 0; i < elements.size(); ++i)
@@ -209,14 +201,8 @@
bool BookmarkDragData::ReadFromPickle(Pickle* pickle) {
void* data_iterator = NULL;
size_t element_count;
-#if defined(WCHAR_T_IS_UTF16)
- if (pickle->ReadWString(&data_iterator, &profile_path_) &&
-#elif defined(WCHAR_T_IS_UTF32)
- if (pickle->ReadString(&data_iterator, &profile_path_) &&
-#else
- NOTIMPLEMENTED() << "Impossible encoding situation!";
- if (false &&
-#endif
+ if (FilePath::ReadStringTypeFromPickle(pickle, &data_iterator,
+ &profile_path_) &&
pickle->ReadSize(&data_iterator, &element_count)) {
std::vector<Element> tmp_elements;
tmp_elements.resize(element_count);
« no previous file with comments | « chrome/browser/bookmarks/bookmark_drag_data.h ('k') | chrome/browser/extensions/extension_toolbar_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698