summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_system_operation_context.cc
blob: 5f0abf0e339061c9a398c2bce3446faf94c08cf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (c) 2011 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/fileapi/file_system_operation_context.h"

#include "webkit/fileapi/file_system_context.h"
#include "webkit/fileapi/file_system_util.h"

namespace fileapi {

FileSystemOperationContext::FileSystemOperationContext(
    FileSystemContext* context,
    FileSystemFileUtil* file_util)
    : file_system_context_(context),
      src_file_util_(file_util),
      dest_file_util_(file_util),
      src_type_(kFileSystemTypeUnknown),
      dest_type_(kFileSystemTypeUnknown),
      allowed_bytes_growth_(0) {
}

FileSystemOperationContext::~FileSystemOperationContext() {
}

FileSystemOperationContext*
FileSystemOperationContext::CreateInheritedContextForDest() const {
  FileSystemOperationContext* context = new FileSystemOperationContext(
      file_system_context_.get(), dest_file_util_);
  context->set_src_origin_url(dest_origin_url_);
  context->set_src_type(dest_type_);
  context->set_allowed_bytes_growth(allowed_bytes_growth_);
  return context;
}

}  // namespace fileapi