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

Side by Side Diff: content/browser/download/save_types.h

Issue 1548443002: Introducing gpu::CommandBufferId as a distinct, IdType<...>-based type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@type-safe-save-package-id-self-contained
Patch Set: Moved base/id_type... into gpu/command_buffer/common/id_type.… Created 4 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
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 #ifndef CONTENT_BROWSER_DOWNLOAD_SAVE_TYPES_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_SAVE_TYPES_H_
6 #define CONTENT_BROWSER_DOWNLOAD_SAVE_TYPES_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_SAVE_TYPES_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <string> 11 #include <string>
12 #include <utility> 12 #include <utility>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
16 #include "content/common/id_type.h" 16 #include "gpu/command_buffer/common/id_type.h"
17 #include "url/gurl.h" 17 #include "url/gurl.h"
18 18
19 namespace content { 19 namespace content {
20 20
21 class SavePackage; 21 class SavePackage;
22 using SavePackageId = IdType32<SavePackage>; 22 using SavePackageId = gpu::IdType32<SavePackage>;
piman 2016/02/09 23:29:32 Yeah, this is technically permitted, but really re
Łukasz Anforowicz 2016/02/10 22:18:14 Let me add nick@ to the reviewer's line. Nick - W
ncarter (slow) 2016/02/10 23:34:16 I think it should go in base/, but if we can't put
Łukasz Anforowicz 2016/02/11 16:51:25 Ok.
23 23
24 class SaveItem; 24 class SaveItem;
25 using SaveItemId = IdType32<SaveItem>; 25 using SaveItemId = gpu::IdType32<SaveItem>;
26 26
27 // Map from save_item_id into final file path. 27 // Map from save_item_id into final file path.
28 using FinalNamesMap = std::map<SaveItemId, base::FilePath>; 28 using FinalNamesMap = std::map<SaveItemId, base::FilePath>;
29 29
30 // This structure is used to handle and deliver some info 30 // This structure is used to handle and deliver some info
31 // when processing each save item job. 31 // when processing each save item job.
32 struct SaveFileCreateInfo { 32 struct SaveFileCreateInfo {
33 enum SaveFileSource { 33 enum SaveFileSource {
34 // This type indicates the source is not set. 34 // This type indicates the source is not set.
35 SAVE_FILE_FROM_UNKNOWN = -1, 35 SAVE_FILE_FROM_UNKNOWN = -1,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 std::string content_disposition; 85 std::string content_disposition;
86 // Total bytes of saved file. 86 // Total bytes of saved file.
87 int64_t total_bytes; 87 int64_t total_bytes;
88 // Source type of saved file. 88 // Source type of saved file.
89 SaveFileSource save_source; 89 SaveFileSource save_source;
90 }; 90 };
91 91
92 } // namespace content 92 } // namespace content
93 93
94 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_TYPES_H_ 94 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_TYPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698