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

Side by Side Diff: components/search_engines/template_url.h

Issue 1595103007: TemplateURL Performance - don't call replace search terms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ 5 #ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_
6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ 6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 // replacements_ giving the index of the terms to replace. 445 // replacements_ giving the index of the terms to replace.
446 mutable std::string parsed_url_; 446 mutable std::string parsed_url_;
447 447
448 // Do we support search term replacement? 448 // Do we support search term replacement?
449 mutable bool supports_replacements_; 449 mutable bool supports_replacements_;
450 450
451 // The replaceable parts of url (parsed_url_). These are ordered by index 451 // The replaceable parts of url (parsed_url_). These are ordered by index
452 // into the string, and may be empty. 452 // into the string, and may be empty.
453 mutable Replacements replacements_; 453 mutable Replacements replacements_;
454 454
455 // Host, path, key and location of the search term. These are only set if the 455 // Host, port, path, key and location of the search term. These are only set
456 // url contains one search term. 456 // if the url contains one search term.
457 mutable std::string host_; 457 mutable std::string host_;
458 mutable std::string port_;
458 mutable std::string path_; 459 mutable std::string path_;
459 mutable std::string search_term_key_; 460 mutable std::string search_term_key_;
460 mutable size_t search_term_position_in_path_; 461 mutable size_t search_term_position_in_path_;
461 mutable url::Parsed::ComponentType search_term_key_location_; 462 mutable url::Parsed::ComponentType search_term_key_location_;
462 463
463 mutable PostParams post_params_; 464 mutable PostParams post_params_;
464 465
465 // Whether the contained URL is a pre-populated URL. 466 // Whether the contained URL is a pre-populated URL.
466 bool prepopulated_; 467 bool prepopulated_;
467 468
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 TemplateURLRef new_tab_url_ref_; 736 TemplateURLRef new_tab_url_ref_;
736 TemplateURLRef contextual_search_url_ref_; 737 TemplateURLRef contextual_search_url_ref_;
737 scoped_ptr<AssociatedExtensionInfo> extension_info_; 738 scoped_ptr<AssociatedExtensionInfo> extension_info_;
738 739
739 // TODO(sky): Add date last parsed OSD file. 740 // TODO(sky): Add date last parsed OSD file.
740 741
741 DISALLOW_COPY_AND_ASSIGN(TemplateURL); 742 DISALLOW_COPY_AND_ASSIGN(TemplateURL);
742 }; 743 };
743 744
744 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ 745 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_
OLDNEW
« no previous file with comments | « no previous file | components/search_engines/template_url.cc » ('j') | components/search_engines/template_url.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698