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

Unified Diff: webkit/browser/fileapi/sandbox_isolated_origin_database.cc

Issue 539143002: Migrate webkit/browser/ to storage/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android build Created 6 years, 3 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
Index: webkit/browser/fileapi/sandbox_isolated_origin_database.cc
diff --git a/webkit/browser/fileapi/sandbox_isolated_origin_database.cc b/webkit/browser/fileapi/sandbox_isolated_origin_database.cc
deleted file mode 100644
index 9d8afeaec8efc6ba3c54b2c682eaf53113f12972..0000000000000000000000000000000000000000
--- a/webkit/browser/fileapi/sandbox_isolated_origin_database.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "webkit/browser/fileapi/sandbox_isolated_origin_database.h"
-
-#include "base/files/file_util.h"
-#include "base/logging.h"
-#include "webkit/browser/fileapi/sandbox_origin_database.h"
-
-namespace storage {
-
-// Special directory name for isolated origin.
-const base::FilePath::CharType
-SandboxIsolatedOriginDatabase::kObsoleteOriginDirectory[] =
- FILE_PATH_LITERAL("iso");
-
-SandboxIsolatedOriginDatabase::SandboxIsolatedOriginDatabase(
- const std::string& origin,
- const base::FilePath& file_system_directory,
- const base::FilePath& origin_directory)
- : migration_checked_(false),
- origin_(origin),
- file_system_directory_(file_system_directory),
- origin_directory_(origin_directory) {
-}
-
-SandboxIsolatedOriginDatabase::~SandboxIsolatedOriginDatabase() {
-}
-
-bool SandboxIsolatedOriginDatabase::HasOriginPath(
- const std::string& origin) {
- return (origin_ == origin);
-}
-
-bool SandboxIsolatedOriginDatabase::GetPathForOrigin(
- const std::string& origin, base::FilePath* directory) {
- if (origin != origin_)
- return false;
- *directory = origin_directory_;
- return true;
-}
-
-bool SandboxIsolatedOriginDatabase::RemovePathForOrigin(
- const std::string& origin) {
- return true;
-}
-
-bool SandboxIsolatedOriginDatabase::ListAllOrigins(
- std::vector<OriginRecord>* origins) {
- origins->push_back(OriginRecord(origin_, origin_directory_));
- return true;
-}
-
-void SandboxIsolatedOriginDatabase::DropDatabase() {
-}
-
-void SandboxIsolatedOriginDatabase::MigrateBackFromObsoleteOriginDatabase(
- const std::string& origin,
- const base::FilePath& file_system_directory,
- SandboxOriginDatabase* database) {
- base::FilePath isolated_directory =
- file_system_directory.Append(kObsoleteOriginDirectory);
-
- if (database->HasOriginPath(origin)) {
- // Don't bother.
- base::DeleteFile(isolated_directory, true /* recursive */);
- return;
- }
-
- base::FilePath directory_name;
- if (database->GetPathForOrigin(origin, &directory_name)) {
- base::FilePath origin_directory =
- file_system_directory.Append(directory_name);
- base::DeleteFile(origin_directory, true /* recursive */);
- base::Move(isolated_directory, origin_directory);
- }
-}
-
-} // namespace storage
« no previous file with comments | « webkit/browser/fileapi/sandbox_isolated_origin_database.h ('k') | webkit/browser/fileapi/sandbox_origin_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698