| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/gtk/bookmarks/bookmark_utils_gtk.h" | 5 #include "chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.h" |
| 6 | 6 |
| 7 #include "base/pickle.h" | 7 #include "base/pickle.h" |
| 8 #include "base/string16.h" | 8 #include "base/string16.h" |
| 9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 string16 title; | 455 string16 title; |
| 456 if (!ui::ExtractNetscapeURL(selection_data, &url, &title)) | 456 if (!ui::ExtractNetscapeURL(selection_data, &url, &title)) |
| 457 return false; | 457 return false; |
| 458 | 458 |
| 459 model->AddURL(parent, idx, title, url); | 459 model->AddURL(parent, idx, title, url); |
| 460 return true; | 460 return true; |
| 461 } | 461 } |
| 462 | 462 |
| 463 string16 GetNameForURL(const GURL& url) { | 463 string16 GetNameForURL(const GURL& url) { |
| 464 if (url.is_valid()) { | 464 if (url.is_valid()) { |
| 465 return net::GetSuggestedFilename(url, "", "", "", "", std::string()); | 465 return net::GetSuggestedFilename(url, |
| 466 std::string(), |
| 467 std::string(), |
| 468 std::string(), |
| 469 std::string(), |
| 470 std::string()); |
| 466 } else { | 471 } else { |
| 467 return l10n_util::GetStringUTF16(IDS_APP_UNTITLED_SHORTCUT_FILE_NAME); | 472 return l10n_util::GetStringUTF16(IDS_APP_UNTITLED_SHORTCUT_FILE_NAME); |
| 468 } | 473 } |
| 469 } | 474 } |
| 470 | 475 |
| 471 } // namespace bookmark_utils | 476 } // namespace bookmark_utils |
| OLD | NEW |