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

Side by Side Diff: chrome/browser/safe_browsing/browser_feature_extractor.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/safe_browsing/browser_feature_extractor.h" 5 #include "chrome/browser/safe_browsing/browser_feature_extractor.h"
6 6
7 #include <map> 7 #include <map>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 break; 201 break;
202 } 202 }
203 } 203 }
204 } 204 }
205 205
206 // Add features pertaining to how we got to 206 // Add features pertaining to how we got to
207 // 1) The candidate url 207 // 1) The candidate url
208 // 2) The first url on the same host as the candidate url (assuming that 208 // 2) The first url on the same host as the candidate url (assuming that
209 // it's different from the candidate url). 209 // it's different from the candidate url).
210 if (url_index != -1) { 210 if (url_index != -1) {
211 AddNavigationFeatures("", controller, url_index, info->url_redirects, 211 AddNavigationFeatures(
212 request); 212 std::string(), controller, url_index, info->url_redirects, request);
213 } 213 }
214 if (first_host_index != -1) { 214 if (first_host_index != -1) {
215 AddNavigationFeatures(features::kHostPrefix, 215 AddNavigationFeatures(features::kHostPrefix,
216 controller, 216 controller,
217 first_host_index, 217 first_host_index,
218 info->host_redirects, 218 info->host_redirects,
219 request); 219 request);
220 } 220 }
221 221
222 ExtractBrowseInfoFeatures(*info, request); 222 ExtractBrowseInfoFeatures(*info, request);
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 Profile::EXPLICIT_ACCESS); 480 Profile::EXPLICIT_ACCESS);
481 if (*history) { 481 if (*history) {
482 return true; 482 return true;
483 } 483 }
484 } 484 }
485 VLOG(2) << "Unable to query history. No history service available."; 485 VLOG(2) << "Unable to query history. No history service available.";
486 return false; 486 return false;
487 } 487 }
488 488
489 } // namespace safe_browsing 489 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698