summaryrefslogtreecommitdiffstats
path: root/components/enhanced_bookmarks
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
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')
-rw-r--r--components/enhanced_bookmarks/enhanced_bookmark_model.cc8
-rw-r--r--components/enhanced_bookmarks/metadata_accessor.cc10
2 files changed, 9 insertions, 9 deletions
diff --git a/components/enhanced_bookmarks/enhanced_bookmark_model.cc b/components/enhanced_bookmarks/enhanced_bookmark_model.cc
index 77ee726..4b4b590 100644
--- a/components/enhanced_bookmarks/enhanced_bookmark_model.cc
+++ b/components/enhanced_bookmarks/enhanced_bookmark_model.cc
@@ -199,7 +199,7 @@ bool EnhancedBookmarkModel::SetOriginalImage(const BookmarkNode* node,
image::collections::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)
@@ -229,7 +229,7 @@ bool EnhancedBookmarkModel::GetOriginalImage(const BookmarkNode* node,
int* width,
int* height) {
std::string decoded(DataForMetaInfoField(node, kImageDataKey));
- if (decoded == "")
+ if (decoded.empty())
return false;
image::collections::ImageData data;
@@ -248,7 +248,7 @@ bool EnhancedBookmarkModel::GetThumbnailImage(const BookmarkNode* node,
int* width,
int* height) {
std::string decoded(DataForMetaInfoField(node, kImageDataKey));
- if (decoded == "")
+ if (decoded.empty())
return false;
image::collections::ImageData data;
@@ -503,7 +503,7 @@ bool EnhancedBookmarkModel::SetAllImages(const BookmarkNode* node,
image::collections::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)
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)