Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Unified Diff: chrome/browser/history/history_backend.cc

Issue 368133005: Fixes for re-enabling more MSVC level 4 warnings: chrome/browser/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/history/history_backend.cc
diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc
index c7fc71a026ddcf254be531525021783e990e190b..3081b0578ed275e28cf9b745ed02a0a02557164d 100644
--- a/chrome/browser/history/history_backend.cc
+++ b/chrome/browser/history/history_backend.cc
@@ -308,8 +308,10 @@ SegmentID HistoryBackend::UpdateSegments(
if (!url_id)
return 0;
- if (!(segment_id = db_->GetSegmentNamed(segment_name))) {
- if (!(segment_id = db_->CreateSegment(url_id, segment_name))) {
+ segment_id = db_->GetSegmentNamed(segment_name);
+ if (!segment_id) {
+ segment_id = db_->CreateSegment(url_id, segment_name);
+ if (!segment_id) {
NOTREACHED();
return 0;
}
@@ -324,7 +326,8 @@ SegmentID HistoryBackend::UpdateSegments(
// This can happen if the initial navigation wasn't AUTO_BOOKMARK or
// TYPED. (For example GENERATED). In this case this visit doesn't count
// toward any segment.
- if (!(segment_id = GetLastSegmentID(from_visit)))
+ segment_id = GetLastSegmentID(from_visit);
+ if (!segment_id)
return 0;
}

Powered by Google App Engine
This is Rietveld 408576698