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

Side by Side Diff: webkit/blob/blob_storage_controller.h

Issue 12163003: Add FilePath to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
« no previous file with comments | « webkit/blob/blob_data.cc ('k') | webkit/blob/blob_storage_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef WEBKIT_BLOB_BLOB_STORAGE_CONTROLLER_H_ 5 #ifndef WEBKIT_BLOB_BLOB_STORAGE_CONTROLLER_H_
6 #define WEBKIT_BLOB_BLOB_STORAGE_CONTROLLER_H_ 6 #define WEBKIT_BLOB_BLOB_STORAGE_CONTROLLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/hash_tables.h" 11 #include "base/hash_tables.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/process.h" 13 #include "base/process.h"
14 #include "webkit/blob/blob_data.h" 14 #include "webkit/blob/blob_data.h"
15 #include "webkit/storage/webkit_storage_export.h" 15 #include "webkit/storage/webkit_storage_export.h"
16 16
17 class GURL; 17 class GURL;
18 class FilePath;
19 18
20 namespace base { 19 namespace base {
20 class FilePath;
21 class Time; 21 class Time;
22 } 22 }
23 23
24 namespace webkit_blob { 24 namespace webkit_blob {
25 25
26 // This class handles the logistics of blob Storage within the browser process. 26 // This class handles the logistics of blob Storage within the browser process.
27 class WEBKIT_STORAGE_EXPORT BlobStorageController { 27 class WEBKIT_STORAGE_EXPORT BlobStorageController {
28 public: 28 public:
29 BlobStorageController(); 29 BlobStorageController();
30 ~BlobStorageController(); 30 ~BlobStorageController();
(...skipping 10 matching lines...) Expand all
41 friend class ViewBlobInternalsJob; 41 friend class ViewBlobInternalsJob;
42 42
43 typedef base::hash_map<std::string, scoped_refptr<BlobData> > BlobMap; 43 typedef base::hash_map<std::string, scoped_refptr<BlobData> > BlobMap;
44 typedef std::map<BlobData*, int> BlobDataUsageMap; 44 typedef std::map<BlobData*, int> BlobDataUsageMap;
45 45
46 void AppendStorageItems(BlobData* target_blob_data, 46 void AppendStorageItems(BlobData* target_blob_data,
47 BlobData* src_blob_data, 47 BlobData* src_blob_data,
48 uint64 offset, 48 uint64 offset,
49 uint64 length); 49 uint64 length);
50 void AppendFileItem(BlobData* target_blob_data, 50 void AppendFileItem(BlobData* target_blob_data,
51 const FilePath& file_path, uint64 offset, uint64 length, 51 const base::FilePath& file_path, uint64 offset,
52 uint64 length,
52 const base::Time& expected_modification_time); 53 const base::Time& expected_modification_time);
53 void AppendFileSystemFileItem( 54 void AppendFileSystemFileItem(
54 BlobData* target_blob_data, 55 BlobData* target_blob_data,
55 const GURL& url, uint64 offset, uint64 length, 56 const GURL& url, uint64 offset, uint64 length,
56 const base::Time& expected_modification_time); 57 const base::Time& expected_modification_time);
57 58
58 bool RemoveFromMapHelper(BlobMap* map, const GURL& url); 59 bool RemoveFromMapHelper(BlobMap* map, const GURL& url);
59 60
60 void IncrementBlobDataUsage(BlobData* blob_data); 61 void IncrementBlobDataUsage(BlobData* blob_data);
61 // Returns true if no longer in use. 62 // Returns true if no longer in use.
(...skipping 10 matching lines...) Expand all
72 // Multiple urls can refer to the same blob data, this map keeps track of 73 // Multiple urls can refer to the same blob data, this map keeps track of
73 // how many urls refer to a BlobData. 74 // how many urls refer to a BlobData.
74 BlobDataUsageMap blob_data_usage_count_; 75 BlobDataUsageMap blob_data_usage_count_;
75 76
76 DISALLOW_COPY_AND_ASSIGN(BlobStorageController); 77 DISALLOW_COPY_AND_ASSIGN(BlobStorageController);
77 }; 78 };
78 79
79 } // namespace webkit_blob 80 } // namespace webkit_blob
80 81
81 #endif // WEBKIT_BLOB_BLOB_STORAGE_CONTROLLER_H_ 82 #endif // WEBKIT_BLOB_BLOB_STORAGE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « webkit/blob/blob_data.cc ('k') | webkit/blob/blob_storage_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698