OLD | NEW |
| (Empty) |
1 // Copyright 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 #include "chrome/browser/android/mock_google_location_settings_helper.h" | |
6 | |
7 bool MockGoogleLocationSettingsHelper::master_location_enabled = false; | |
8 bool MockGoogleLocationSettingsHelper::google_apps_location_enabled = false; | |
9 | |
10 // Factory function | |
11 GoogleLocationSettingsHelper* GoogleLocationSettingsHelper::Create() { | |
12 return new MockGoogleLocationSettingsHelper(); | |
13 } | |
14 | |
15 MockGoogleLocationSettingsHelper::MockGoogleLocationSettingsHelper() | |
16 : GoogleLocationSettingsHelper() { | |
17 } | |
18 | |
19 MockGoogleLocationSettingsHelper::~MockGoogleLocationSettingsHelper() { | |
20 } | |
21 | |
22 void MockGoogleLocationSettingsHelper::SetLocationStatus( | |
23 bool master, bool google_apps) { | |
24 master_location_enabled = master; | |
25 google_apps_location_enabled = google_apps; | |
26 } | |
27 | |
28 bool MockGoogleLocationSettingsHelper::IsGoogleAppsLocationSettingEnabled() { | |
29 return google_apps_location_enabled; | |
30 } | |
31 | |
32 bool MockGoogleLocationSettingsHelper::IsMasterLocationSettingEnabled() { | |
33 return master_location_enabled; | |
34 } | |
35 | |
36 bool MockGoogleLocationSettingsHelper::IsSystemLocationEnabled() { | |
37 return IsMasterLocationSettingEnabled() && | |
38 IsGoogleAppsLocationSettingEnabled(); | |
39 } | |
OLD | NEW |