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

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

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 #include "components/storage_monitor/storage_info.h" 5 #include "components/storage_monitor/storage_info.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 return product_name; 48 return product_name;
49 } 49 }
50 50
51 } // namespace 51 } // namespace
52 52
53 namespace storage_monitor { 53 namespace storage_monitor {
54 54
55 StorageInfo::StorageInfo() : total_size_in_bytes_(0) { 55 StorageInfo::StorageInfo() : total_size_in_bytes_(0) {
56 } 56 }
57 57
58 StorageInfo::StorageInfo(const StorageInfo& other) = default;
59
58 StorageInfo::StorageInfo(const std::string& device_id_in, 60 StorageInfo::StorageInfo(const std::string& device_id_in,
59 const base::FilePath::StringType& device_location, 61 const base::FilePath::StringType& device_location,
60 const base::string16& label, 62 const base::string16& label,
61 const base::string16& vendor, 63 const base::string16& vendor,
62 const base::string16& model, 64 const base::string16& model,
63 uint64_t size_in_bytes) 65 uint64_t size_in_bytes)
64 : device_id_(device_id_in), 66 : device_id_(device_id_in),
65 location_(device_location), 67 location_(device_location),
66 storage_label_(label), 68 storage_label_(label),
67 vendor_name_(vendor), 69 vendor_name_(vendor),
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 name = GetFullProductName(vendor_name_, model_name_); 208 name = GetFullProductName(vendor_name_, model_name_);
207 if (name.empty()) 209 if (name.empty())
208 name = base::ASCIIToUTF16("Unlabeled device"); 210 name = base::ASCIIToUTF16("Unlabeled device");
209 211
210 if (with_size) 212 if (with_size)
211 name = GetDisplayNameForDevice(total_size_in_bytes_, name); 213 name = GetDisplayNameForDevice(total_size_in_bytes_, name);
212 return name; 214 return name;
213 } 215 }
214 216
215 } // namespace storage_monitor 217 } // namespace storage_monitor
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698