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

Side by Side Diff: chrome/browser/media/router/issue.cc

Issue 2771413003: Move c/b/media/router/mojo/*.mojom to chrome/common/media_router/mojo/*.mojom (Closed)
Patch Set: Rebase Created 3 years, 8 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
(Empty)
1 // Copyright 2015 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 "chrome/browser/media/router/issue.h"
6
7 #include "base/atomic_sequence_num.h"
8
9 namespace media_router {
10
11 namespace {
12 // ID generator for Issue.
13 base::StaticAtomicSequenceNumber g_next_issue_id;
14 }
15
16 IssueInfo::IssueInfo()
17 : default_action(IssueInfo::Action::DISMISS),
18 severity(IssueInfo::Severity::NOTIFICATION),
19 is_blocking(false),
20 help_page_id(IssueInfo::kUnknownHelpPageId) {}
21
22 IssueInfo::IssueInfo(const std::string& title,
23 const Action default_action,
24 Severity severity)
25 : title(title),
26 default_action(default_action),
27 severity(severity),
28 is_blocking(severity == IssueInfo::Severity::FATAL),
29 help_page_id(IssueInfo::kUnknownHelpPageId) {}
30
31 IssueInfo::IssueInfo(const IssueInfo& other) = default;
32
33 IssueInfo::~IssueInfo() = default;
34
35 IssueInfo& IssueInfo::operator=(const IssueInfo& other) = default;
36
37 bool IssueInfo::operator==(const IssueInfo& other) const {
38 return title == other.title && default_action == other.default_action &&
39 severity == other.severity && message == other.message &&
40 secondary_actions == other.secondary_actions &&
41 route_id == other.route_id && is_blocking == other.is_blocking &&
42 help_page_id == other.help_page_id;
43 }
44
45 Issue::Issue(const IssueInfo& info)
46 : id_(g_next_issue_id.GetNext()), info_(info) {}
47
48 Issue::~Issue() = default;
49
50 } // namespace media_router
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698