chromeos: Replace ModifyCacheState with a number of small functions to simplify DriveCache

ModifyCacheState was doing a number of things at the same time:
 - Move or copy a file. (and copy was only used by Store())
 - If the symlink_path is not empty, create or delete symlink

That says, ModifyCacheState is unnecessarily complicated so that it can be dividend into four small functions, MoveFile, CopyFile, CreateSymlink and DeleteSymlink.

BUG=None
TEST=unit_tests --gtest_filter="Drive*"

Review URL: https://chromiumcodereview.appspot.com/11358157

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166890 0039d316-1c4b-4281-b951-d872f2087c98
1 file changed