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

Side by Side Diff: storage/browser/fileapi/sandbox_directory_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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_directory_database.h" 5 #include "storage/browser/fileapi/sandbox_directory_database.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <set> 9 #include <set>
10 #include <stack> 10 #include <stack>
11 11
12 #include "base/files/file_enumerator.h" 12 #include "base/files/file_enumerator.h"
13 #include "base/files/file_util.h" 13 #include "base/files/file_util.h"
14 #include "base/location.h" 14 #include "base/location.h"
15 #include "base/metrics/histogram.h" 15 #include "base/metrics/histogram.h"
16 #include "base/pickle.h" 16 #include "base/pickle.h"
17 #include "base/strings/string_number_conversions.h" 17 #include "base/strings/string_number_conversions.h"
18 #include "base/strings/string_util.h" 18 #include "base/strings/string_util.h"
19 #include "storage/browser/fileapi/file_system_usage_cache.h"
20 #include "storage/common/fileapi/file_system_util.h"
19 #include "third_party/leveldatabase/src/include/leveldb/db.h" 21 #include "third_party/leveldatabase/src/include/leveldb/db.h"
20 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h" 22 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h"
21 #include "webkit/browser/fileapi/file_system_usage_cache.h"
22 #include "webkit/common/fileapi/file_system_util.h"
23 23
24 namespace { 24 namespace {
25 25
26 bool PickleFromFileInfo(const storage::SandboxDirectoryDatabase::FileInfo& info, 26 bool PickleFromFileInfo(const storage::SandboxDirectoryDatabase::FileInfo& info,
27 Pickle* pickle) { 27 Pickle* pickle) {
28 DCHECK(pickle); 28 DCHECK(pickle);
29 std::string data_path; 29 std::string data_path;
30 // Round off here to match the behavior of the filesystem on real files. 30 // Round off here to match the behavior of the filesystem on real files.
31 base::Time time = 31 base::Time time =
32 base::Time::FromDoubleT(floor(info.modification_time.ToDoubleT())); 32 base::Time::FromDoubleT(floor(info.modification_time.ToDoubleT()));
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 930
931 void SandboxDirectoryDatabase::HandleError( 931 void SandboxDirectoryDatabase::HandleError(
932 const tracked_objects::Location& from_here, 932 const tracked_objects::Location& from_here,
933 const leveldb::Status& status) { 933 const leveldb::Status& status) {
934 LOG(ERROR) << "SandboxDirectoryDatabase failed at: " 934 LOG(ERROR) << "SandboxDirectoryDatabase failed at: "
935 << from_here.ToString() << " with error: " << status.ToString(); 935 << from_here.ToString() << " with error: " << status.ToString();
936 db_.reset(); 936 db_.reset();
937 } 937 }
938 938
939 } // namespace storage 939 } // namespace storage
OLDNEW
« no previous file with comments | « storage/browser/fileapi/sandbox_directory_database.h ('k') | storage/browser/fileapi/sandbox_file_stream_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698