OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_ANDROID_GOOGLE_LOCATION_SETTINGS_HELPER_H_ | |
6 #define CHROME_BROWSER_ANDROID_GOOGLE_LOCATION_SETTINGS_HELPER_H_ | |
7 | |
8 #include "base/android/jni_helper.h" | |
9 #include "base/android/scoped_java_ref.h" | |
10 #include "base/logging.h" | |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "base/values.h" | |
13 #include "chrome/browser/android/google_location_settings_helper_factory.h" | |
14 | |
15 /* | |
16 * This class is needed to fetch the current system location | |
17 * setting and update the infobar button label based on that information i.e, | |
18 * display "Allow" if google apps setting is set as enabled else, display | |
19 * "Settings" with a link to open the system location settings activity. | |
20 */ | |
bulach
2012/10/23 13:06:26
nit: C++ comments are // instead of /* */
Ramya
2012/10/23 21:57:14
Done.
| |
21 class GoogleLocationSettingsHelper { | |
22 public: | |
23 GoogleLocationSettingsHelper(); | |
24 ~GoogleLocationSettingsHelper() {} | |
bulach
2012/10/23 13:06:26
nit: add \n after this.
also, the destructor shoul
Ramya
2012/10/23 21:57:14
Done.
| |
25 static void SetGoogleLocationSettingsHelperFactory( | |
26 GoogleLocationSettingsHelperFactory* factory); | |
27 std::string GetAcceptButtonLabel(); | |
28 void ShowGoogleLocationSettings(); | |
29 bool IsPlatformSettingEnabled(); | |
30 static bool Register(JNIEnv* env); | |
31 | |
32 private: | |
33 base::android::ScopedJavaGlobalRef<jobject> | |
34 java_google_location_settings_helper_; | |
35 static GoogleLocationSettingsHelperFactory* helper_factory_; | |
bulach
2012/10/23 13:06:26
this will leak.. :(
how about we invert the depen
Jay Civelli
2012/10/23 17:37:53
It should not be too bad a leak though, we only ha
| |
36 | |
37 DISALLOW_COPY_AND_ASSIGN(GoogleLocationSettingsHelper); | |
38 }; | |
39 | |
40 #endif // CHROME_BROWSER_ANDROID_GOOGLE_LOCATION_SETTINGS_HELPER_H_ | |
OLD | NEW |