OLD | NEW |
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 "chrome/browser/notifications/profile_notification.h" | 5 #include "chrome/browser/notifications/profile_notification.h" |
6 | 6 |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "build/build_config.h" |
8 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" | 9 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" |
9 #include "components/signin/core/account_id/account_id.h" | 10 #include "components/signin/core/account_id/account_id.h" |
10 | 11 |
11 // static | 12 // static |
12 std::string ProfileNotification::GetProfileNotificationId( | 13 std::string ProfileNotification::GetProfileNotificationId( |
13 const std::string& delegate_id, | 14 const std::string& delegate_id, |
14 ProfileID profile_id) { | 15 ProfileID profile_id) { |
15 DCHECK(profile_id); | 16 DCHECK(profile_id); |
16 return base::StringPrintf("notification-ui-manager#%p#%s", | 17 return base::StringPrintf("notification-ui-manager#%p#%s", |
17 profile_id, // Each profile has its unique instance | 18 profile_id, // Each profile has its unique instance |
(...skipping 13 matching lines...) Expand all Loading... |
31 notification) { | 32 notification) { |
32 DCHECK(profile); | 33 DCHECK(profile); |
33 #if defined(OS_CHROMEOS) | 34 #if defined(OS_CHROMEOS) |
34 notification_.set_profile_id( | 35 notification_.set_profile_id( |
35 multi_user_util::GetAccountIdFromProfile(profile).GetUserEmail()); | 36 multi_user_util::GetAccountIdFromProfile(profile).GetUserEmail()); |
36 #endif | 37 #endif |
37 } | 38 } |
38 | 39 |
39 ProfileNotification::~ProfileNotification() {} | 40 ProfileNotification::~ProfileNotification() {} |
40 | 41 |
OLD | NEW |