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

Unified Diff: chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/tabmodel/document/MockStorageDelegate.java

Issue 868323003: Begin uniting the TabPersistentStore and StorageDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 5 years, 11 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
« no previous file with comments | « chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/document/OffTheRecordDocumentTabModelTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/tabmodel/document/MockStorageDelegate.java
diff --git a/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/tabmodel/document/MockStorageDelegate.java b/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/tabmodel/document/MockStorageDelegate.java
index fd93aac5028d37fa997ee22df72b1a50ed02ba88..1bca9f590b8939bd15beb1aaa785acc048a19ee5 100644
--- a/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/tabmodel/document/MockStorageDelegate.java
+++ b/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/tabmodel/document/MockStorageDelegate.java
@@ -31,21 +31,20 @@ public class MockStorageDelegate extends StorageDelegate {
private byte[] mTaskFileBytes;
private final File mStateDirectory;
- public MockStorageDelegate(File cacheDirectory, boolean isIncognito) {
- super(isIncognito);
+ public MockStorageDelegate(File cacheDirectory) {
mStateDirectory = new File(cacheDirectory, "DocumentTabModelTest");
ensureDirectoryDestroyed();
}
@Override
- public byte[] readTaskFileBytes() {
- if (mIsIncognito) return null;
+ public byte[] readTaskFileBytes(boolean encrypted) {
+ if (encrypted) return null;
return mTaskFileBytes == null ? null : mTaskFileBytes.clone();
}
@Override
- public void writeTaskFileBytes(byte[] bytes) {
- if (mIsIncognito) return;
+ public void writeTaskFileBytes(boolean encrypted, byte[] bytes) {
+ if (encrypted) return;
mTaskFileBytes = bytes.clone();
}
@@ -71,8 +70,8 @@ public class MockStorageDelegate extends StorageDelegate {
* @param encodedState Base64 encoded TabState.
* @return Whether or not the TabState was successfully read.
*/
- public boolean addEncodedTabState(int tabId, String encodedState) {
- String filename = TabState.getTabStateFilename(tabId, mIsIncognito);
+ public boolean addEncodedTabState(int tabId, boolean encrypted, String encodedState) {
+ String filename = TabState.getTabStateFilename(tabId, encrypted);
File tabStateFile = new File(getStateDirectory(), filename);
FileOutputStream outputStream = null;
try {
« no previous file with comments | « chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/document/OffTheRecordDocumentTabModelTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698