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

Side by Side Diff: chrome/browser/search_engines/template_url_model.h

Issue 3161038: Nothing is ever added to hosts_to_delete_, so this code does nothing useful. (Closed)
Patch Set: Created 10 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/search_engines/template_url_model.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 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_MODEL_H_ 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_MODEL_H_
6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_MODEL_H_ 6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_MODEL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 358
359 // Did loading fail? This is only valid if loaded_ is true. 359 // Did loading fail? This is only valid if loaded_ is true.
360 bool load_failed_; 360 bool load_failed_;
361 361
362 // If non-zero, we're waiting on a load. 362 // If non-zero, we're waiting on a load.
363 WebDataService::Handle load_handle_; 363 WebDataService::Handle load_handle_;
364 364
365 // Service used to store entries. 365 // Service used to store entries.
366 scoped_refptr<WebDataService> service_; 366 scoped_refptr<WebDataService> service_;
367 367
368 // List of hosts to feed to DeleteGeneratedKeywordsMatchingHost. When
369 // we receive NOTIFY_HOST_DELETED_FROM_HISTORY if we haven't loaded yet,
370 // we force a load and add the host to hosts_to_delete_. When done loading
371 // we invoke DeleteGeneratedKeywordsMatchingHost with all the elements of
372 // the vector.
373 std::vector<std::wstring> hosts_to_delete_;
374
375 // All visits that occurred before we finished loading. Once loaded 368 // All visits that occurred before we finished loading. Once loaded
376 // UpdateKeywordSearchTermsForURL is invoked for each element of the vector. 369 // UpdateKeywordSearchTermsForURL is invoked for each element of the vector.
377 std::vector<history::URLVisitedDetails> visits_to_add_; 370 std::vector<history::URLVisitedDetails> visits_to_add_;
378 371
379 const TemplateURL* default_search_provider_; 372 const TemplateURL* default_search_provider_;
380 373
381 // Used for UX testing. Gives the slot in the search engine dialog that was 374 // Used for UX testing. Gives the slot in the search engine dialog that was
382 // chosen as the default search engine. 375 // chosen as the default search engine.
383 int search_engine_dialog_chosen_slot_; 376 int search_engine_dialog_chosen_slot_;
384 377
385 // The default search provider from preferences. This is only valid if 378 // The default search provider from preferences. This is only valid if
386 // GetDefaultSearchProvider is invoked and we haven't been loaded or loading 379 // GetDefaultSearchProvider is invoked and we haven't been loaded or loading
387 // failed. If loading was successful this is not used. 380 // failed. If loading was successful this is not used.
388 scoped_ptr<TemplateURL> prefs_default_search_provider_; 381 scoped_ptr<TemplateURL> prefs_default_search_provider_;
389 382
390 // ID assigned to next TemplateURL added to this model. This is an ever 383 // ID assigned to next TemplateURL added to this model. This is an ever
391 // increasing integer that is initialized from the database. 384 // increasing integer that is initialized from the database.
392 TemplateURL::IDType next_id_; 385 TemplateURL::IDType next_id_;
393 386
394 // List of extension IDs waiting for Load to have keywords registered. 387 // List of extension IDs waiting for Load to have keywords registered.
395 std::vector<std::string> pending_extension_ids_; 388 std::vector<std::string> pending_extension_ids_;
396 389
397 DISALLOW_COPY_AND_ASSIGN(TemplateURLModel); 390 DISALLOW_COPY_AND_ASSIGN(TemplateURLModel);
398 }; 391 };
399 392
400 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_MODEL_H_ 393 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_MODEL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/search_engines/template_url_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698