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

Side by Side Diff: components/storage_monitor/storage_info.h

Issue 1728033002: components: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_STORAGE_MONITOR_STORAGE_INFO_H_ 5 #ifndef COMPONENTS_STORAGE_MONITOR_STORAGE_INFO_H_
6 #define COMPONENTS_STORAGE_MONITOR_STORAGE_INFO_H_ 6 #define COMPONENTS_STORAGE_MONITOR_STORAGE_INFO_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 23 matching lines...) Expand all
34 }; 34 };
35 35
36 StorageInfo(); 36 StorageInfo();
37 // Note: |device_id_in| should be constructed with MakeDeviceId. 37 // Note: |device_id_in| should be constructed with MakeDeviceId.
38 StorageInfo(const std::string& device_id_in, 38 StorageInfo(const std::string& device_id_in,
39 const base::FilePath::StringType& device_location, 39 const base::FilePath::StringType& device_location,
40 const base::string16& label, 40 const base::string16& label,
41 const base::string16& vendor, 41 const base::string16& vendor,
42 const base::string16& model, 42 const base::string16& model,
43 uint64_t size_in_bytes); 43 uint64_t size_in_bytes);
44 StorageInfo(const StorageInfo& other);
44 ~StorageInfo(); 45 ~StorageInfo();
45 46
46 // Returns a device id given properties of the device. A prefix dependent on 47 // Returns a device id given properties of the device. A prefix dependent on
47 // |type| is added so |unique_id| need only be unique within the given type. 48 // |type| is added so |unique_id| need only be unique within the given type.
48 // Returns an empty string if an invalid type is passed in. 49 // Returns an empty string if an invalid type is passed in.
49 static std::string MakeDeviceId(Type type, const std::string& unique_id); 50 static std::string MakeDeviceId(Type type, const std::string& unique_id);
50 51
51 // Extracts the device |type| and |unique_id| from |device_id|. Returns false 52 // Extracts the device |type| and |unique_id| from |device_id|. Returns false
52 // if the device_id isn't properly formatted. 53 // if the device_id isn't properly formatted.
53 static bool CrackDeviceId(const std::string& device_id, 54 static bool CrackDeviceId(const std::string& device_id,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 base::string16 model_name_; 117 base::string16 model_name_;
117 118
118 // Size of the removable device in bytes. 119 // Size of the removable device in bytes.
119 // Zero if not collected or unknown. 120 // Zero if not collected or unknown.
120 uint64_t total_size_in_bytes_; 121 uint64_t total_size_in_bytes_;
121 }; 122 };
122 123
123 } // namespace storage_monitor 124 } // namespace storage_monitor
124 125
125 #endif // COMPONENTS_STORAGE_MONITOR_STORAGE_INFO_H_ 126 #endif // COMPONENTS_STORAGE_MONITOR_STORAGE_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698