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

Unified Diff: chrome/browser/android/google_location_settings_helper_factory.cc

Issue 11186010: Update geolocation infobar to handle Android system settings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Failed to upload Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/google_location_settings_helper_factory.cc
diff --git a/chrome/browser/android/google_location_settings_helper_factory.cc b/chrome/browser/android/google_location_settings_helper_factory.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f78250085bee54a72034e94dcb8de484ca091261
--- /dev/null
+++ b/chrome/browser/android/google_location_settings_helper_factory.cc
@@ -0,0 +1,31 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/android/google_location_settings_helper_factory.h"
+
+#include "base/logging.h"
+#include "base/android/jni_android.h"
+#include "base/android/jni_string.h"
+#include "jni/GoogleLocationSettingsHelperStub_jni.h"
+
+GoogleLocationSettingsHelperFactory::GoogleLocationSettingsHelperFactory() {
+}
+
+GoogleLocationSettingsHelperFactory::~GoogleLocationSettingsHelperFactory() {
+}
+
+const base::android::ScopedJavaGlobalRef<jobject>&
+ GoogleLocationSettingsHelperFactory::GetHelperInstance() {
+ JNIEnv* env = base::android::AttachCurrentThread();
+ java_google_location_settings_helper_.Reset(
+ Java_GoogleLocationSettingsHelperStub_createInstance(env,
+ base::android::GetApplicationContext()));
+ return java_google_location_settings_helper_;
+}
+
+// Register native methods
+
+bool GoogleLocationSettingsHelperFactory::Register(JNIEnv* env) {
+ return RegisterNativesImpl(env);
+}

Powered by Google App Engine
This is Rietveld 408576698