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

Side by Side Diff: ash/system/system_notifier.cc

Issue 110173004: Introduces the notifier id for multi-profile notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ash/system/system_notifier.h" 5 #include "ash/system/system_notifier.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace ash { 9 namespace ash {
10 namespace system_notifier { 10 namespace system_notifier {
11 11
12 namespace { 12 namespace {
13 13
14 // See http://dev.chromium.org/chromium-os/chromiumos-design-docs/ 14 // See http://dev.chromium.org/chromium-os/chromiumos-design-docs/
15 // system-notifications for the reasoning. 15 // system-notifications for the reasoning.
16 const char* kAlwaysShownNotifierIds[] = { 16 const char* kAlwaysShownNotifierIds[] = {
17 kNotifierDisplay, 17 kNotifierDisplay,
18 kNotifierDisplayError, 18 kNotifierDisplayError,
19 kNotifierPower, 19 kNotifierPower,
20 NULL 20 NULL
21 }; 21 };
22 22
23 const char* kAshSystemNotifiers[] = { 23 const char* kAshSystemNotifiers[] = {
24 kNotifierDisplay, 24 kNotifierDisplay,
25 kNotifierDisplayResolutionChange, 25 kNotifierDisplayResolutionChange,
26 kNotifierDisplayError, 26 kNotifierDisplayError,
27 kNotifierInputMethod, 27 kNotifierInputMethod,
28 kNotifierLocale, 28 kNotifierLocale,
29 kNotifierLocallyManagedUser, 29 kNotifierLocallyManagedUser,
30 kNotifierMultiProfileFirstRun,
30 kNotifierNetwork, 31 kNotifierNetwork,
31 kNotifierNetworkError, 32 kNotifierNetworkError,
32 kNotifierScreenshot, 33 kNotifierScreenshot,
33 kNotifierScreenCapture, 34 kNotifierScreenCapture,
34 kNotifierScreenShare, 35 kNotifierScreenShare,
35 kNotifierSessionLengthTimeout, 36 kNotifierSessionLengthTimeout,
36 kNotifierPower, 37 kNotifierPower,
37 NULL 38 NULL
38 }; 39 };
39 40
(...skipping 10 matching lines...) Expand all
50 } 51 }
51 52
52 } // namespace 53 } // namespace
53 54
54 const char kNotifierDisplay[] = "ash.display"; 55 const char kNotifierDisplay[] = "ash.display";
55 const char kNotifierDisplayResolutionChange[] = "ash.display.resolution-change"; 56 const char kNotifierDisplayResolutionChange[] = "ash.display.resolution-change";
56 const char kNotifierDisplayError[] = "ash.display.error"; 57 const char kNotifierDisplayError[] = "ash.display.error";
57 const char kNotifierInputMethod[] = "ash.input-method"; 58 const char kNotifierInputMethod[] = "ash.input-method";
58 const char kNotifierLocale[] = "ash.locale"; 59 const char kNotifierLocale[] = "ash.locale";
59 const char kNotifierLocallyManagedUser[] = "ash.locally-managed-user"; 60 const char kNotifierLocallyManagedUser[] = "ash.locally-managed-user";
61 const char kNotifierMultiProfileFirstRun[] = "ash.multi-profile.first-run";
60 const char kNotifierNetwork[] = "ash.network"; 62 const char kNotifierNetwork[] = "ash.network";
61 const char kNotifierNetworkError[] = "ash.network.error"; 63 const char kNotifierNetworkError[] = "ash.network.error";
62 const char kNotifierScreenshot[] = "ash.screenshot"; 64 const char kNotifierScreenshot[] = "ash.screenshot";
63 const char kNotifierScreenCapture[] = "ash.screen-capture"; 65 const char kNotifierScreenCapture[] = "ash.screen-capture";
64 const char kNotifierScreenShare[] = "ash.screen-share"; 66 const char kNotifierScreenShare[] = "ash.screen-share";
65 const char kNotifierSessionLengthTimeout[] = "ash.session-length-timeout"; 67 const char kNotifierSessionLengthTimeout[] = "ash.session-length-timeout";
66 const char kNotifierPower[] = "ash.power"; 68 const char kNotifierPower[] = "ash.power";
67 69
68 bool ShouldAlwaysShowPopups(const message_center::NotifierId& notifier_id) { 70 bool ShouldAlwaysShowPopups(const message_center::NotifierId& notifier_id) {
69 return MatchSystemNotifierId(notifier_id, kAlwaysShownNotifierIds); 71 return MatchSystemNotifierId(notifier_id, kAlwaysShownNotifierIds);
70 } 72 }
71 73
72 bool IsAshSystemNotifier(const message_center::NotifierId& notifier_id) { 74 bool IsAshSystemNotifier(const message_center::NotifierId& notifier_id) {
73 return MatchSystemNotifierId(notifier_id, kAshSystemNotifiers); 75 return MatchSystemNotifierId(notifier_id, kAshSystemNotifiers);
74 } 76 }
75 77
76 } // namespace system_notifier 78 } // namespace system_notifier
77 } // namespace ash 79 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/system_notifier.h ('k') | chrome/browser/chromeos/login/multi_profile_first_run_notification.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698