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

Side by Side Diff: chrome/browser/history/url_index_private_data.h

Issue 10382032: Coverity: Fix pass by value error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/history/url_index_private_data.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_HISTORY_URL_INDEX_PRIVATE_DATA_H_ 5 #ifndef CHROME_BROWSER_HISTORY_URL_INDEX_PRIVATE_DATA_H_
6 #define CHROME_BROWSER_HISTORY_URL_INDEX_PRIVATE_DATA_H_ 6 #define CHROME_BROWSER_HISTORY_URL_INDEX_PRIVATE_DATA_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // This is likely to occur for short omnibox terms such as 'h' and 'w' which 135 // This is likely to occur for short omnibox terms such as 'h' and 'w' which
136 // will be found in nearly all history candidates. Results are sorted by 136 // will be found in nearly all history candidates. Results are sorted by
137 // descending score. The full results set (i.e. beyond the 137 // descending score. The full results set (i.e. beyond the
138 // |kItemsToScoreLimit| limit) will be retained and used for subsequent calls 138 // |kItemsToScoreLimit| limit) will be retained and used for subsequent calls
139 // to this function. 139 // to this function.
140 ScoredHistoryMatches HistoryItemsForTerms(const string16& term_string); 140 ScoredHistoryMatches HistoryItemsForTerms(const string16& term_string);
141 141
142 // Creates a new URLIndexPrivateData object, populates it from the contents 142 // Creates a new URLIndexPrivateData object, populates it from the contents
143 // of the cache file stored in |file_path|, and assigns it to |private_data|. 143 // of the cache file stored in |file_path|, and assigns it to |private_data|.
144 // |languages| will be used to break URLs and page titles into words and is 144 // |languages| will be used to break URLs and page titles into words and is
145 // deliberately passed by value. 145 // deliberately passed by value.
mrossetti 2012/05/07 15:31:22 Eliminate this portion of comment: " and is delibe
kmadhusu 2012/05/07 17:43:06 Done.
146 static void RestoreFromFileTask( 146 static void RestoreFromFileTask(
147 const FilePath& file_path, 147 const FilePath& file_path,
148 scoped_refptr<URLIndexPrivateData> private_data, 148 scoped_refptr<URLIndexPrivateData> private_data,
149 std::string languages); 149 const std::string& languages);
150 150
151 // Constructs a new object by restoring its contents from the file at |path|. 151 // Constructs a new object by restoring its contents from the file at |path|.
152 // Returns the new URLIndexPrivateData which on success will contain the 152 // Returns the new URLIndexPrivateData which on success will contain the
153 // restored data but upon failure will be empty. |languages| will be used to 153 // restored data but upon failure will be empty. |languages| will be used to
154 // break URLs and page titles into words 154 // break URLs and page titles into words
155 static scoped_refptr<URLIndexPrivateData> RestoreFromFile( 155 static scoped_refptr<URLIndexPrivateData> RestoreFromFile(
156 const FilePath& path, 156 const FilePath& path,
157 const std::string& languages); 157 const std::string& languages);
158 158
159 // Constructs a new object by rebuilding its contents from the history 159 // Constructs a new object by rebuilding its contents from the history
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 // Used for unit testing only. Records the number of candidate history items 366 // Used for unit testing only. Records the number of candidate history items
367 // at three stages in the index searching process. 367 // at three stages in the index searching process.
368 size_t pre_filter_item_count_; // After word index is queried. 368 size_t pre_filter_item_count_; // After word index is queried.
369 size_t post_filter_item_count_; // After trimming large result set. 369 size_t post_filter_item_count_; // After trimming large result set.
370 size_t post_scoring_item_count_; // After performing final filter/scoring. 370 size_t post_scoring_item_count_; // After performing final filter/scoring.
371 }; 371 };
372 372
373 } // namespace history 373 } // namespace history
374 374
375 #endif // CHROME_BROWSER_HISTORY_URL_INDEX_PRIVATE_DATA_H_ 375 #endif // CHROME_BROWSER_HISTORY_URL_INDEX_PRIVATE_DATA_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/history/url_index_private_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698