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

Side by Side Diff: webkit/browser/fileapi/sandbox_isolated_origin_database.cc

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/browser/fileapi/sandbox_isolated_origin_database.h" 5 #include "webkit/browser/fileapi/sandbox_isolated_origin_database.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "webkit/browser/fileapi/sandbox_origin_database.h" 9 #include "webkit/browser/fileapi/sandbox_origin_database.h"
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 new SandboxOriginDatabase(file_system_directory_)); 65 new SandboxOriginDatabase(file_system_directory_));
66 if (!database->HasOriginPath(origin_)) 66 if (!database->HasOriginPath(origin_))
67 return; 67 return;
68 68
69 base::FilePath directory_name; 69 base::FilePath directory_name;
70 if (database->GetPathForOrigin(origin_, &directory_name) && 70 if (database->GetPathForOrigin(origin_, &directory_name) &&
71 directory_name != base::FilePath(kOriginDirectory)) { 71 directory_name != base::FilePath(kOriginDirectory)) {
72 base::FilePath from_path = file_system_directory_.Append(directory_name); 72 base::FilePath from_path = file_system_directory_.Append(directory_name);
73 base::FilePath to_path = file_system_directory_.Append(kOriginDirectory); 73 base::FilePath to_path = file_system_directory_.Append(kOriginDirectory);
74 74
75 if (file_util::PathExists(to_path)) 75 if (base::PathExists(to_path))
76 base::Delete(to_path, true /* recursive */); 76 base::Delete(to_path, true /* recursive */);
77 base::Move(from_path, to_path); 77 base::Move(from_path, to_path);
78 } 78 }
79 79
80 database->RemoveDatabase(); 80 database->RemoveDatabase();
81 } 81 }
82 82
83 } // namespace fileapi 83 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698