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

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

Issue 11552020: Add search_terms_replacement_key field to TemplateURL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with protector removal Created 8 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
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_SEARCH_ENGINES_SEARCH_TERMS_DATA_H_ 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_SEARCH_TERMS_DATA_H_
6 #define CHROME_BROWSER_SEARCH_ENGINES_SEARCH_TERMS_DATA_H_ 6 #define CHROME_BROWSER_SEARCH_ENGINES_SEARCH_TERMS_DATA_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // accessing the Profile, so this can only ever be non-empty for 48 // accessing the Profile, so this can only ever be non-empty for
49 // UIThreadSearchTermsData. 49 // UIThreadSearchTermsData.
50 virtual std::string InstantEnabledParam() const; 50 virtual std::string InstantEnabledParam() const;
51 51
52 // Returns a string indicating whether InstantExtended is enabled, suitable 52 // Returns a string indicating whether InstantExtended is enabled, suitable
53 // for adding as a query string param to the homepage or search requests. 53 // for adding as a query string param to the homepage or search requests.
54 // Returns an empty string otherwise. Determining this requires accessing the 54 // Returns an empty string otherwise. Determining this requires accessing the
55 // Profile, so this can only ever be non-empty for UIThreadSearchTermsData. 55 // Profile, so this can only ever be non-empty for UIThreadSearchTermsData.
56 virtual std::string InstantExtendedEnabledParam() const; 56 virtual std::string InstantExtendedEnabledParam() const;
57 57
58 // Returns the parameter key used in InstantExtended URLs. To get the
59 // "key=value" pair use InstantExtendedEnabledParam().
60 virtual std::string InstantExtendedEnabledKey() const;
Peter Kasting 2012/12/18 01:54:43 How come this needs to be virtual (or in fact defi
beaudoin 2012/12/20 04:23:29 Done.
61
58 private: 62 private:
59 DISALLOW_COPY_AND_ASSIGN(SearchTermsData); 63 DISALLOW_COPY_AND_ASSIGN(SearchTermsData);
60 }; 64 };
61 65
62 // Implementation of SearchTermsData that is only usable on the UI thread. 66 // Implementation of SearchTermsData that is only usable on the UI thread.
63 class UIThreadSearchTermsData : public SearchTermsData { 67 class UIThreadSearchTermsData : public SearchTermsData {
64 public: 68 public:
65 // If |profile_| is NULL, the Google base URL accessors will return default 69 // If |profile_| is NULL, the Google base URL accessors will return default
66 // values, and InstantEnabledParam() and InstantExtendedEnabledParam() will 70 // values, and InstantEnabledParam() and InstantExtendedEnabledParam() will
67 // return the empty string. 71 // return the empty string.
(...skipping 11 matching lines...) Expand all
79 static void SetGoogleBaseURL(const std::string& base_url); 83 static void SetGoogleBaseURL(const std::string& base_url);
80 84
81 private: 85 private:
82 static std::string* google_base_url_; 86 static std::string* google_base_url_;
83 Profile* profile_; 87 Profile* profile_;
84 88
85 DISALLOW_COPY_AND_ASSIGN(UIThreadSearchTermsData); 89 DISALLOW_COPY_AND_ASSIGN(UIThreadSearchTermsData);
86 }; 90 };
87 91
88 #endif // CHROME_BROWSER_SEARCH_ENGINES_SEARCH_TERMS_DATA_H_ 92 #endif // CHROME_BROWSER_SEARCH_ENGINES_SEARCH_TERMS_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698