OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/clipboard/scoped_clipboard_writer.h" |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/pickle.h" | 9 #include "base/pickle.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 11 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/bookmarks/bookmark_model.h" | 12 #include "chrome/browser/bookmarks/bookmark_model.h" |
12 #if defined(OS_MACOSX) | 13 #if defined(OS_MACOSX) |
13 #include "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h" | 14 #include "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h" |
14 #endif | 15 #endif |
15 #include "chrome/browser/profile.h" | 16 #include "chrome/browser/profile.h" |
16 #include "chrome/common/url_constants.h" | 17 #include "chrome/common/url_constants.h" |
17 #include "chrome/browser/browser_process.h" | 18 #include "chrome/browser/browser_process.h" |
18 #include "net/base/escape.h" | 19 #include "net/base/escape.h" |
19 | 20 |
20 const char* BookmarkDragData::kClipboardFormatString = | 21 const char* BookmarkDragData::kClipboardFormatString = |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 DCHECK(profile_path_.empty()); | 305 DCHECK(profile_path_.empty()); |
305 | 306 |
306 if (profile) | 307 if (profile) |
307 profile_path_ = profile->GetPath().value(); | 308 profile_path_ = profile->GetPath().value(); |
308 } | 309 } |
309 | 310 |
310 bool BookmarkDragData::IsFromProfile(Profile* profile) const { | 311 bool BookmarkDragData::IsFromProfile(Profile* profile) const { |
311 // An empty path means the data is not associated with any profile. | 312 // An empty path means the data is not associated with any profile. |
312 return !profile_path_.empty() && profile_path_ == profile->GetPath().value(); | 313 return !profile_path_.empty() && profile_path_ == profile->GetPath().value(); |
313 } | 314 } |
OLD | NEW |