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

Side by Side Diff: chrome/browser/autocomplete/search_provider.cc

Issue 5618002: Coverity: Initialize member variables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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/in_process_webkit/indexed_db_context.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/autocomplete/search_provider.h" 5 #include "chrome/browser/autocomplete/search_provider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 if (default_provider) 53 if (default_provider)
54 cached_default_provider_ = *default_provider; 54 cached_default_provider_ = *default_provider;
55 keyword_provider_ = keyword_provider; 55 keyword_provider_ = keyword_provider;
56 if (keyword_provider) 56 if (keyword_provider)
57 cached_keyword_provider_ = *keyword_provider; 57 cached_keyword_provider_ = *keyword_provider;
58 } 58 }
59 59
60 SearchProvider::SearchProvider(ACProviderListener* listener, Profile* profile) 60 SearchProvider::SearchProvider(ACProviderListener* listener, Profile* profile)
61 : AutocompleteProvider(listener, profile, "Search"), 61 : AutocompleteProvider(listener, profile, "Search"),
62 suggest_results_pending_(0), 62 suggest_results_pending_(0),
63 have_suggest_results_(false),
63 instant_finalized_(false) { 64 instant_finalized_(false) {
64 } 65 }
65 66
66 void SearchProvider::FinalizeInstantQuery(const std::wstring& text) { 67 void SearchProvider::FinalizeInstantQuery(const std::wstring& text) {
67 if (done_ || instant_finalized_) 68 if (done_ || instant_finalized_)
68 return; 69 return;
69 70
70 instant_finalized_ = true; 71 instant_finalized_ = true;
71 UpdateDone(); 72 UpdateDone();
72 73
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 805
805 return match; 806 return match;
806 } 807 }
807 808
808 void SearchProvider::UpdateDone() { 809 void SearchProvider::UpdateDone() {
809 // We're done when there are no more suggest queries pending (this is set to 1 810 // We're done when there are no more suggest queries pending (this is set to 1
810 // when the timer is started) and we're not waiting on instant. 811 // when the timer is started) and we're not waiting on instant.
811 done_ = ((suggest_results_pending_ == 0) && 812 done_ = ((suggest_results_pending_ == 0) &&
812 (instant_finalized_ || !InstantController::IsEnabled(profile_))); 813 (instant_finalized_ || !InstantController::IsEnabled(profile_)));
813 } 814 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/in_process_webkit/indexed_db_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698