diff options
author | miguelg@chromium.org <miguelg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-07 19:33:04 +0000 |
---|---|---|
committer | miguelg@chromium.org <miguelg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-07 19:33:04 +0000 |
commit | 79407372e823edbf1d5426bf5775597e606bfd2b (patch) | |
tree | 21da9e44dc34e8f17f7da698430c93f2bb0dc229 | |
parent | 0ded2c41094cc42209d58b02813c11be063ec519 (diff) | |
download | chromium_src-79407372e823edbf1d5426bf5775597e606bfd2b.zip chromium_src-79407372e823edbf1d5426bf5775597e606bfd2b.tar.gz chromium_src-79407372e823edbf1d5426bf5775597e606bfd2b.tar.bz2 |
Remove unused methods from GoogleLocationSettingsHelper
Depends on https://codereview.chromium.org/441883003/ and an additional
downstream patch
BUG=400694
Review URL: https://codereview.chromium.org/440123002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288111 0039d316-1c4b-4281-b951-d872f2087c98
5 files changed, 10 insertions, 46 deletions
diff --git a/chrome/browser/android/google_location_settings_helper.cc b/chrome/browser/android/google_location_settings_helper.cc deleted file mode 100644 index 3dc8e00..0000000 --- a/chrome/browser/android/google_location_settings_helper.cc +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2014 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.h" - -// Temporary stubs for a 3 way patch - -std::string GoogleLocationSettingsHelper::GetAcceptButtonLabel(bool allow) { - return std::string(); -} - -bool GoogleLocationSettingsHelper::IsAllowLabel() { - return false; -} - -void GoogleLocationSettingsHelper::ShowGoogleLocationSettings() { -} - -bool GoogleLocationSettingsHelper::IsMasterLocationSettingEnabled() { - return false; -} - -bool GoogleLocationSettingsHelper::IsGoogleAppsLocationSettingEnabled() { - return false; -} - -bool GoogleLocationSettingsHelper::IsSystemLocationEnabled() { - return IsMasterLocationSettingEnabled() && - IsGoogleAppsLocationSettingEnabled(); -} diff --git a/chrome/browser/android/google_location_settings_helper.h b/chrome/browser/android/google_location_settings_helper.h index 8b8091f..5ffc776 100644 --- a/chrome/browser/android/google_location_settings_helper.h +++ b/chrome/browser/android/google_location_settings_helper.h @@ -17,21 +17,11 @@ class GoogleLocationSettingsHelper { static GoogleLocationSettingsHelper* Create(); - virtual bool IsSystemLocationEnabled(); + virtual bool IsSystemLocationEnabled() = 0; protected: GoogleLocationSettingsHelper() {} - // TODO(miguelg) Remove these three methods once the downstream - // dependencies get updated. - virtual std::string GetAcceptButtonLabel(bool allow); - virtual bool IsAllowLabel(); - virtual void ShowGoogleLocationSettings(); - - // Checks both Master and Google Apps location setting to see - // if we should allow geolocation. - virtual bool IsMasterLocationSettingEnabled(); - virtual bool IsGoogleAppsLocationSettingEnabled(); private: diff --git a/chrome/browser/android/mock_google_location_settings_helper.cc b/chrome/browser/android/mock_google_location_settings_helper.cc index ce8be12..b88e0c9 100644 --- a/chrome/browser/android/mock_google_location_settings_helper.cc +++ b/chrome/browser/android/mock_google_location_settings_helper.cc @@ -32,3 +32,8 @@ bool MockGoogleLocationSettingsHelper::IsGoogleAppsLocationSettingEnabled() { bool MockGoogleLocationSettingsHelper::IsMasterLocationSettingEnabled() { return master_location_enabled; } + +bool MockGoogleLocationSettingsHelper::IsSystemLocationEnabled() { + return IsMasterLocationSettingEnabled() && + IsGoogleAppsLocationSettingEnabled(); +} diff --git a/chrome/browser/android/mock_google_location_settings_helper.h b/chrome/browser/android/mock_google_location_settings_helper.h index 14fa9c8..1dd3676 100644 --- a/chrome/browser/android/mock_google_location_settings_helper.h +++ b/chrome/browser/android/mock_google_location_settings_helper.h @@ -12,9 +12,10 @@ class MockGoogleLocationSettingsHelper : public GoogleLocationSettingsHelper { public: static void SetLocationStatus(bool master, bool google_apps); - // GoogleLocationSettingsHelper implementation: - virtual bool IsMasterLocationSettingEnabled() OVERRIDE; - virtual bool IsGoogleAppsLocationSettingEnabled() OVERRIDE; + virtual bool IsSystemLocationEnabled() OVERRIDE; + + bool IsMasterLocationSettingEnabled(); + bool IsGoogleAppsLocationSettingEnabled(); protected: MockGoogleLocationSettingsHelper(); diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 5c67093..5fbf657 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -57,7 +57,6 @@ 'browser/android/new_tab_page_prefs.h', 'browser/android/new_tab_page_url_handler.cc', 'browser/android/new_tab_page_url_handler.h', - 'browser/android/google_location_settings_helper.cc', 'browser/android/google_location_settings_helper.h', 'browser/android/intent_helper.cc', 'browser/android/intent_helper.h', |