summaryrefslogtreecommitdiffstats
path: root/components/enhanced_bookmarks/metadata_accessor.cc
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2015-01-09 22:04:33 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-10 06:06:18 +0000
commit3d0a879593821df0d5c72424f0fb60aa8b266607 (patch)
tree54c80a5261b3452d1c87f8c7a4fae33aacff2552 /components/enhanced_bookmarks/metadata_accessor.cc
parent2eb44014970b8aa0333940a9f88ebd83edb497ac (diff)
downloadchromium_src-3d0a879593821df0d5c72424f0fb60aa8b266607.zip
chromium_src-3d0a879593821df0d5c72424f0fb60aa8b266607.tar.gz
chromium_src-3d0a879593821df0d5c72424f0fb60aa8b266607.tar.bz2
Cleanup: Call std::string::empty instead of comparing against "".
Review URL: https://codereview.chromium.org/811583003 Cr-Commit-Position: refs/heads/master@{#310968}
Diffstat (limited to 'components/enhanced_bookmarks/metadata_accessor.cc')
-rw-r--r--components/enhanced_bookmarks/metadata_accessor.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/components/enhanced_bookmarks/metadata_accessor.cc b/components/enhanced_bookmarks/metadata_accessor.cc
index e2013b9..fc74885 100644
--- a/components/enhanced_bookmarks/metadata_accessor.cc
+++ b/components/enhanced_bookmarks/metadata_accessor.cc
@@ -119,7 +119,7 @@ bool SetOriginalImageForBookmark(BookmarkModel* bookmark_model,
ImageData data;
// Try to populate the imageData with the existing data.
- if (decoded != "") {
+ if (!decoded.empty()) {
// If the parsing fails, something is wrong. Immediately fail.
bool result = data.ParseFromString(decoded);
if (!result)
@@ -150,7 +150,7 @@ bool OriginalImageFromBookmark(const BookmarkNode* node,
int* width,
int* height) {
std::string decoded(DataForMetaInfoField(node, kImageDataKey));
- if (decoded == "")
+ if (decoded.empty())
return false;
ImageData data;
@@ -169,7 +169,7 @@ bool ThumbnailImageFromBookmark(const BookmarkNode* node,
int* width,
int* height) {
std::string decoded(DataForMetaInfoField(node, kImageDataKey));
- if (decoded == "")
+ if (decoded.empty())
return false;
ImageData data;
@@ -185,7 +185,7 @@ bool ThumbnailImageFromBookmark(const BookmarkNode* node,
std::string SnippetFromBookmark(const BookmarkNode* node) {
std::string decoded(DataForMetaInfoField(node, kPageDataKey));
- if (decoded == "")
+ if (decoded.empty())
return decoded;
PageData data;
@@ -210,7 +210,7 @@ bool SetAllImagesForBookmark(BookmarkModel* bookmark_model,
ImageData data;
// Try to populate the imageData with the existing data.
- if (decoded != "") {
+ if (!decoded.empty()) {
// If the parsing fails, something is wrong. Immediately fail.
bool result = data.ParseFromString(decoded);
if (!result)