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

Side by Side Diff: ash/public/cpp/app_launch_id.cc

Issue 2865743002: ash: Rename AppLaunchId to ShelfID. (Closed)
Patch Set: Address comment. Created 3 years, 7 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
« no previous file with comments | « ash/public/cpp/app_launch_id.h ('k') | ash/public/cpp/shelf_types.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ash/public/cpp/app_launch_id.h"
6
7 #include "base/logging.h"
8
9 namespace ash {
10
11 AppLaunchId::AppLaunchId(const std::string& app_id,
12 const std::string& launch_id)
13 : app_id(app_id), launch_id(launch_id) {
14 DCHECK(launch_id.empty() || !app_id.empty()) << "launch ids require app ids.";
15 }
16
17 AppLaunchId::AppLaunchId(const std::string& app_id) : app_id(app_id) {}
18
19 AppLaunchId::AppLaunchId() = default;
20
21 AppLaunchId::~AppLaunchId() = default;
22
23 AppLaunchId::AppLaunchId(const AppLaunchId& other) = default;
24
25 AppLaunchId::AppLaunchId(AppLaunchId&& other) = default;
26
27 AppLaunchId& AppLaunchId::operator=(const AppLaunchId& other) = default;
28
29 bool AppLaunchId::operator==(const AppLaunchId& other) const {
30 return app_id == other.app_id && launch_id == other.launch_id;
31 }
32
33 bool AppLaunchId::operator!=(const AppLaunchId& other) const {
34 return !(*this == other);
35 }
36
37 bool AppLaunchId::operator<(const AppLaunchId& other) const {
38 return app_id < other.app_id ||
39 (app_id == other.app_id && launch_id < other.launch_id);
40 }
41
42 bool AppLaunchId::IsNull() const {
43 return app_id.empty() && launch_id.empty();
44 }
45
46 } // namespace ash
OLDNEW
« no previous file with comments | « ash/public/cpp/app_launch_id.h ('k') | ash/public/cpp/shelf_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698