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

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

Issue 648653003: Standardize usage of virtual/override/final in chrome/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 CHROME_BROWSER_SEARCH_ENGINES_UI_THREAD_SEARCH_TERMS_DATA_H_ 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_UI_THREAD_SEARCH_TERMS_DATA_H_
6 #define CHROME_BROWSER_SEARCH_ENGINES_UI_THREAD_SEARCH_TERMS_DATA_H_ 6 #define CHROME_BROWSER_SEARCH_ENGINES_UI_THREAD_SEARCH_TERMS_DATA_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "components/search_engines/search_terms_data.h" 13 #include "components/search_engines/search_terms_data.h"
14 14
15 class Profile; 15 class Profile;
16 16
17 // Implementation of SearchTermsData that is only usable on the UI thread. 17 // Implementation of SearchTermsData that is only usable on the UI thread.
18 class UIThreadSearchTermsData : public SearchTermsData { 18 class UIThreadSearchTermsData : public SearchTermsData {
19 public: 19 public:
20 // If |profile_| is NULL, the Google base URL accessors will return default 20 // If |profile_| is NULL, the Google base URL accessors will return default
21 // values, and NTPIsThemedParam() will return an empty string. 21 // values, and NTPIsThemedParam() will return an empty string.
22 explicit UIThreadSearchTermsData(Profile* profile); 22 explicit UIThreadSearchTermsData(Profile* profile);
23 23
24 virtual std::string GoogleBaseURLValue() const override; 24 std::string GoogleBaseURLValue() const override;
25 virtual std::string GetApplicationLocale() const override; 25 std::string GetApplicationLocale() const override;
26 virtual base::string16 GetRlzParameterValue(bool from_app_list) const 26 base::string16 GetRlzParameterValue(bool from_app_list) const override;
27 override; 27 std::string GetSearchClient() const override;
28 virtual std::string GetSearchClient() const override; 28 std::string GetSuggestClient() const override;
29 virtual std::string GetSuggestClient() const override; 29 std::string GetSuggestRequestIdentifier() const override;
30 virtual std::string GetSuggestRequestIdentifier() const override; 30 bool EnableAnswersInSuggest() const override;
31 virtual bool EnableAnswersInSuggest() const override; 31 bool IsShowingSearchTermsOnSearchResultsPages() const override;
32 virtual bool IsShowingSearchTermsOnSearchResultsPages() const override; 32 std::string InstantExtendedEnabledParam(bool for_search) const override;
33 virtual std::string InstantExtendedEnabledParam( 33 std::string ForceInstantResultsParam(bool for_prerender) const override;
34 bool for_search) const override; 34 int OmniboxStartMargin() const override;
35 virtual std::string ForceInstantResultsParam( 35 std::string NTPIsThemedParam() const override;
36 bool for_prerender) const override; 36 std::string GoogleImageSearchSource() const override;
37 virtual int OmniboxStartMargin() const override;
38 virtual std::string NTPIsThemedParam() const override;
39 virtual std::string GoogleImageSearchSource() const override;
40 37
41 // Used by tests to override the value for the Google base URL. Passing the 38 // Used by tests to override the value for the Google base URL. Passing the
42 // empty string cancels this override. 39 // empty string cancels this override.
43 static void SetGoogleBaseURL(const std::string& base_url); 40 static void SetGoogleBaseURL(const std::string& base_url);
44 41
45 private: 42 private:
46 static std::string* google_base_url_; 43 static std::string* google_base_url_;
47 Profile* profile_; 44 Profile* profile_;
48 45
49 DISALLOW_COPY_AND_ASSIGN(UIThreadSearchTermsData); 46 DISALLOW_COPY_AND_ASSIGN(UIThreadSearchTermsData);
50 }; 47 };
51 48
52 #endif // CHROME_BROWSER_SEARCH_ENGINES_UI_THREAD_SEARCH_TERMS_DATA_H_ 49 #endif // CHROME_BROWSER_SEARCH_ENGINES_UI_THREAD_SEARCH_TERMS_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698