| Index: chrome/browser/extensions/extension_bookmarks_module.cc
|
| diff --git a/chrome/browser/extensions/extension_bookmarks_module.cc b/chrome/browser/extensions/extension_bookmarks_module.cc
|
| index 991ea2d598e6ee39c421e1f065bac3e284336cab..1f6e4ee3fb1388042981ebbd12d59fd43deb6d2a 100644
|
| --- a/chrome/browser/extensions/extension_bookmarks_module.cc
|
| +++ b/chrome/browser/extensions/extension_bookmarks_module.cc
|
| @@ -545,20 +545,17 @@ bool UpdateBookmarkFunction::RunImpl() {
|
| DictionaryValue* updates;
|
| EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(1, &updates));
|
|
|
| - string16 title;
|
| - std::string url_string;
|
| -
|
| // Optional but we need to distinguish non present from an empty title.
|
| + string16 title;
|
| const bool has_title = updates->GetString(keys::kTitleKey, &title);
|
| - updates->GetString(keys::kUrlKey, &url_string); // Optional.
|
| -
|
| - GURL url;
|
| - if (!url_string.empty()) {
|
| - url = GURL(url_string);
|
|
|
| - // If URL is present then it needs to be a non empty valid URL.
|
| - EXTENSION_FUNCTION_VALIDATE(!url.is_empty());
|
| - EXTENSION_FUNCTION_VALIDATE(url.is_valid());
|
| + // Optional.
|
| + std::string url_string;
|
| + updates->GetString(keys::kUrlKey, &url_string);
|
| + GURL url(url_string);
|
| + if (!url_string.empty() && !url.is_valid()) {
|
| + error_ = keys::kInvalidUrlError;
|
| + return false;
|
| }
|
|
|
| BookmarkModel* model = profile()->GetBookmarkModel();
|
|
|