| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/bookmarks/bookmark_drag_data.h" | 5 #include "chrome/browser/bookmarks/bookmark_drag_data.h" |
| 6 | 6 |
| 7 #include "app/clipboard/scoped_clipboard_writer.h" |
| 7 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 8 #include "base/pickle.h" | 9 #include "base/pickle.h" |
| 9 #include "base/scoped_clipboard_writer.h" | |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 11 #include "chrome/browser/bookmarks/bookmark_model.h" | 11 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 12 #include "chrome/browser/profile.h" | 12 #include "chrome/browser/profile.h" |
| 13 #include "chrome/common/url_constants.h" | 13 #include "chrome/common/url_constants.h" |
| 14 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
| 15 #include "net/base/escape.h" | 15 #include "net/base/escape.h" |
| 16 | 16 |
| 17 const char* BookmarkDragData::kClipboardFormatString = | 17 const char* BookmarkDragData::kClipboardFormatString = |
| 18 "chromium/x-bookmark-entries"; | 18 "chromium/x-bookmark-entries"; |
| 19 | 19 |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 | 251 |
| 252 bool BookmarkDragData::IsFromProfile(Profile* profile) const { | 252 bool BookmarkDragData::IsFromProfile(Profile* profile) const { |
| 253 // An empty path means the data is not associated with any profile. | 253 // An empty path means the data is not associated with any profile. |
| 254 return (!profile_path_.empty() && | 254 return (!profile_path_.empty() && |
| 255 #if defined(WCHAR_T_IS_UTF16) | 255 #if defined(WCHAR_T_IS_UTF16) |
| 256 profile->GetPath().ToWStringHack() == profile_path_); | 256 profile->GetPath().ToWStringHack() == profile_path_); |
| 257 #elif defined(WCHAR_T_IS_UTF32) | 257 #elif defined(WCHAR_T_IS_UTF32) |
| 258 profile->GetPath().value() == profile_path_); | 258 profile->GetPath().value() == profile_path_); |
| 259 #endif | 259 #endif |
| 260 } | 260 } |
| OLD | NEW |