Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
michael@0 | 1 | /* Any copyright is dedicated to the Public Domain. |
michael@0 | 2 | http://creativecommons.org/publicdomain/zero/1.0/ */ |
michael@0 | 3 | |
michael@0 | 4 | package org.mozilla.gecko.background.healthreport; |
michael@0 | 5 | |
michael@0 | 6 | import java.io.File; |
michael@0 | 7 | import java.io.FileNotFoundException; |
michael@0 | 8 | import java.io.IOException; |
michael@0 | 9 | |
michael@0 | 10 | import org.json.JSONException; |
michael@0 | 11 | import org.json.JSONObject; |
michael@0 | 12 | import org.mozilla.gecko.background.healthreport.ProfileInformationCache; |
michael@0 | 13 | |
michael@0 | 14 | public class MockProfileInformationCache extends ProfileInformationCache { |
michael@0 | 15 | public MockProfileInformationCache(String profilePath) { |
michael@0 | 16 | super(profilePath); |
michael@0 | 17 | } |
michael@0 | 18 | |
michael@0 | 19 | public boolean isInitialized() { |
michael@0 | 20 | return this.initialized; |
michael@0 | 21 | } |
michael@0 | 22 | public boolean needsWrite() { |
michael@0 | 23 | return this.needsWrite; |
michael@0 | 24 | } |
michael@0 | 25 | public File getFile() { |
michael@0 | 26 | return this.file; |
michael@0 | 27 | } |
michael@0 | 28 | |
michael@0 | 29 | public void writeJSON(JSONObject toWrite) throws IOException { |
michael@0 | 30 | writeToFile(toWrite); |
michael@0 | 31 | } |
michael@0 | 32 | |
michael@0 | 33 | public JSONObject readJSON() throws FileNotFoundException, JSONException { |
michael@0 | 34 | return readFromFile(); |
michael@0 | 35 | } |
michael@0 | 36 | |
michael@0 | 37 | public void setInitialized(final boolean initialized) { |
michael@0 | 38 | this.initialized = initialized; |
michael@0 | 39 | } |
michael@0 | 40 | } |