Commit 1eb99a01 authored by Wei Lee's avatar Wei Lee Committed by Commit Bot

[CCA] Cleanup for internal directory usage

Since we have removed the legacy migration logic in:
https://crrev.com/c/2407733, we don't need internal directory usage
anymore.

Note that we still need internal temporary directory to store
temporary video file for intent purpose.

Bug: 1127587
Test: Launch CCA and no error shows.
Change-Id: I2d2a09328f328a0e6c675f85145f215fd140c1b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2438082Reviewed-by: default avatarShik Chen <shik@chromium.org>
Commit-Queue: Wei Lee <wtlee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811997}
parent d10652fa
......@@ -29,12 +29,6 @@ function hasImagePrefix(entry) {
return entry.name.startsWith(IMAGE_PREFIX);
}
/**
* Directory in the internal file system.
* @type {?AbstractDirectoryEntry}
*/
let internalDir = null;
/**
* Temporary directory in the internal file system.
* @type {?AbstractDirectoryEntry}
......@@ -55,18 +49,6 @@ export function getCameraDirectory() {
return cameraDir;
}
/**
* Initializes the directory in the internal file system.
* @return {!Promise<!AbstractDirectoryEntry>} Promise for the directory result.
*/
function initInternalDir() {
return new Promise((resolve, reject) => {
webkitRequestFileSystem(
window.PERSISTENT, 768 * 1024 * 1024 /* 768MB */,
(fs) => resolve(new ChromeDirectoryEntry(fs.root)), reject);
});
}
/**
* Initializes the temporary directory in the internal file system.
* @return {!Promise<!AbstractDirectoryEntry>} Promise for the directory result.
......@@ -93,9 +75,6 @@ async function initCameraDirectory() {
* @return {!Promise}
*/
export async function initialize() {
internalDir = await initInternalDir();
assert(internalDir !== null);
internalTempDir = await initInternalTempDir();
assert(internalTempDir !== null);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment