Commit dfadfaf7 authored by tfarina's avatar tfarina Committed by Commit bot

bookmarks: Reuse kJavaScriptScheme constant from //url module.

BUG=None
TEST=no functional changes
R=sky@chromium.org

Review URL: https://codereview.chromium.org/867493003

Cr-Commit-Position: refs/heads/master@{#315194}
parent e7020ca2
...@@ -8,15 +8,10 @@ ...@@ -8,15 +8,10 @@
#include "base/pickle.h" #include "base/pickle.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "ui/base/clipboard/clipboard.h" #include "ui/base/clipboard/clipboard.h"
#include "url/url_constants.h"
namespace bookmarks { namespace bookmarks {
namespace {
const char kJavaScriptScheme[] = "javascript";
} // namespace
// static // static
const ui::OSExchangeData::CustomFormat& const ui::OSExchangeData::CustomFormat&
BookmarkNodeData::GetBookmarkCustomFormat() { BookmarkNodeData::GetBookmarkCustomFormat() {
...@@ -35,7 +30,7 @@ void BookmarkNodeData::Write(const base::FilePath& profile_path, ...@@ -35,7 +30,7 @@ void BookmarkNodeData::Write(const base::FilePath& profile_path,
// If there is only one element and it is a URL, write the URL to the // If there is only one element and it is a URL, write the URL to the
// clipboard. // clipboard.
if (has_single_url()) { if (has_single_url()) {
if (elements[0].url.SchemeIs(kJavaScriptScheme)) { if (elements[0].url.SchemeIs(url::kJavaScriptScheme)) {
data->SetString(base::UTF8ToUTF16(elements[0].url.spec())); data->SetString(base::UTF8ToUTF16(elements[0].url.spec()));
} else { } else {
data->SetURL(elements[0].url, elements[0].title); data->SetURL(elements[0].url, elements[0].title);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment