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

Side by Side Diff: chrome/browser/autocomplete_history_manager.cc

Issue 6275011: DCHECK(result) keeps firing in AutocompleteHistoryManager::OnWebDataServiceRequestDone() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Spelling. Created 9 years, 11 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 | no next file » | 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_history_manager.h" 5 #include "chrome/browser/autocomplete_history_manager.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 const WDTypedResult* result) { 168 const WDTypedResult* result) {
169 DCHECK(pending_query_handle_); 169 DCHECK(pending_query_handle_);
170 pending_query_handle_ = 0; 170 pending_query_handle_ = 0;
171 171
172 if (!*autofill_enabled_) { 172 if (!*autofill_enabled_) {
173 SendSuggestions(NULL); 173 SendSuggestions(NULL);
174 return; 174 return;
175 } 175 }
176 176
177 DCHECK(result); 177 DCHECK(result);
178 // Returning early here if |result| is NULL. We've seen this happen on
179 // Linux due to NFS dismounting and causing sql failures.
180 // See http://crbug.com/68783.
181 if (!result) {
182 SendSuggestions(NULL);
183 return;
184 }
185
178 DCHECK(result->GetType() == AUTOFILL_VALUE_RESULT); 186 DCHECK(result->GetType() == AUTOFILL_VALUE_RESULT);
179 const WDResult<std::vector<string16> >* autofill_result = 187 const WDResult<std::vector<string16> >* autofill_result =
180 static_cast<const WDResult<std::vector<string16> >*>(result); 188 static_cast<const WDResult<std::vector<string16> >*>(result);
181 std::vector<string16> suggestions = autofill_result->GetValue(); 189 std::vector<string16> suggestions = autofill_result->GetValue();
182 SendSuggestions(&suggestions); 190 SendSuggestions(&suggestions);
183 } 191 }
184 192
185 AutocompleteHistoryManager::AutocompleteHistoryManager( 193 AutocompleteHistoryManager::AutocompleteHistoryManager(
186 Profile* profile, WebDataService* wds) : tab_contents_(NULL), 194 Profile* profile, WebDataService* wds) : tab_contents_(NULL),
187 profile_(profile), 195 profile_(profile),
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 autofill_icons_, 241 autofill_icons_,
234 autofill_unique_ids_)); 242 autofill_unique_ids_));
235 } 243 }
236 244
237 query_id_ = 0; 245 query_id_ = 0;
238 autofill_values_.clear(); 246 autofill_values_.clear();
239 autofill_labels_.clear(); 247 autofill_labels_.clear();
240 autofill_icons_.clear(); 248 autofill_icons_.clear();
241 autofill_unique_ids_.clear(); 249 autofill_unique_ids_.clear();
242 } 250 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698