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

Side by Side Diff: chrome/browser/android/locale/special_locale_handler.h

Issue 2347973002: Enable Chrome to tweak search engines for some locales (Closed)
Patch Set: pkasting's additional comments Created 4 years, 3 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
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_ANDROID_LOCALE_SPECIAL_LOCALE_HANDLER_H_
6 #define CHROME_BROWSER_ANDROID_LOCALE_SPECIAL_LOCALE_HANDLER_H_
7
8 #include <jni.h>
9
10 #include "base/android/scoped_java_ref.h"
11 #include "base/macros.h"
12 #include "components/search_engines/template_url.h"
13
14 using base::android::JavaParamRef;
15 using std::string;
16 using std::vector;
Maria 2016/09/22 17:17:55 nit: I feel like it's really uncommon to have usin
Peter Kasting 2016/09/23 01:28:36 I don't know that there's anything explicit, but y
Ian Wen 2016/09/23 22:01:56 Done.
17
18 class TemplateURLService;
19
20 class SpecialLocaleHandler {
21 public:
22 explicit SpecialLocaleHandler(const string& locale);
23 void Destroy(JNIEnv* env, const JavaParamRef<jobject>& obj);
24 jboolean LoadTemplateUrls(JNIEnv* env, const JavaParamRef<jobject>& obj);
25 void RemoveTemplateUrls(JNIEnv* env, const JavaParamRef<jobject>& obj);
26 void OverrideDefaultSearchProvider(JNIEnv* env,
27 const JavaParamRef<jobject>& obj);
28
29 private:
30 virtual ~SpecialLocaleHandler();
31
32 string locale_;
33
34 // Tracks all local search engines that were added to TURL service.
35 vector<int> prepopulate_ids_;
36
37 // Pointer to the TemplateUrlService for the main profile.
38 TemplateURLService* template_url_service_;
39
40 DISALLOW_COPY_AND_ASSIGN(SpecialLocaleHandler);
41 };
42
43 bool RegisterSpecialLocaleHandler(JNIEnv* env);
44
45 #endif // CHROME_BROWSER_ANDROID_LOCALE_SPECIAL_LOCALE_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/locale/OWNERS ('k') | chrome/browser/android/locale/special_locale_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698