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

Side by Side Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc

Issue 1376663002: Remove const qualifier from function return type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « chrome/browser/ui/ash/system_tray_delegate_chromeos.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" 5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 void SystemTrayDelegateChromeOS::ChangeProfilePicture() { 359 void SystemTrayDelegateChromeOS::ChangeProfilePicture() {
360 content::RecordAction( 360 content::RecordAction(
361 base::UserMetricsAction("OpenChangeProfilePictureDialog")); 361 base::UserMetricsAction("OpenChangeProfilePictureDialog"));
362 ShowSettingsSubPageForActiveUser(chrome::kChangeProfilePictureSubPage); 362 ShowSettingsSubPageForActiveUser(chrome::kChangeProfilePictureSubPage);
363 } 363 }
364 364
365 std::string SystemTrayDelegateChromeOS::GetEnterpriseDomain() const { 365 std::string SystemTrayDelegateChromeOS::GetEnterpriseDomain() const {
366 return enterprise_domain_; 366 return enterprise_domain_;
367 } 367 }
368 368
369 const base::string16 SystemTrayDelegateChromeOS::GetEnterpriseMessage() const { 369 base::string16 SystemTrayDelegateChromeOS::GetEnterpriseMessage() const {
370 if (GetEnterpriseDomain().empty()) 370 if (GetEnterpriseDomain().empty())
371 return base::string16(); 371 return base::string16();
372 return l10n_util::GetStringFUTF16(IDS_DEVICE_OWNED_BY_NOTICE, 372 return l10n_util::GetStringFUTF16(IDS_DEVICE_OWNED_BY_NOTICE,
373 base::UTF8ToUTF16(GetEnterpriseDomain())); 373 base::UTF8ToUTF16(GetEnterpriseDomain()));
374 } 374 }
375 375
376 const std::string SystemTrayDelegateChromeOS::GetSupervisedUserManager() const { 376 std::string SystemTrayDelegateChromeOS::GetSupervisedUserManager() const {
377 if (!IsUserSupervised()) 377 if (!IsUserSupervised())
378 return std::string(); 378 return std::string();
379 return SupervisedUserServiceFactory::GetForProfile(user_profile_)-> 379 return SupervisedUserServiceFactory::GetForProfile(user_profile_)->
380 GetCustodianEmailAddress(); 380 GetCustodianEmailAddress();
381 } 381 }
382 382
383 const base::string16 383 base::string16
384 SystemTrayDelegateChromeOS::GetSupervisedUserManagerName() const { 384 SystemTrayDelegateChromeOS::GetSupervisedUserManagerName() const {
385 if (!IsUserSupervised()) 385 if (!IsUserSupervised())
386 return base::string16(); 386 return base::string16();
387 return base::UTF8ToUTF16(SupervisedUserServiceFactory::GetForProfile( 387 return base::UTF8ToUTF16(SupervisedUserServiceFactory::GetForProfile(
388 user_profile_)->GetCustodianName()); 388 user_profile_)->GetCustodianName());
389 } 389 }
390 390
391 const base::string16 SystemTrayDelegateChromeOS::GetSupervisedUserMessage() 391 base::string16 SystemTrayDelegateChromeOS::GetSupervisedUserMessage()
392 const { 392 const {
393 if (!IsUserSupervised()) 393 if (!IsUserSupervised())
394 return base::string16(); 394 return base::string16();
395 if (IsUserChild()) 395 if (IsUserChild())
396 return GetChildUserMessage(); 396 return GetChildUserMessage();
397 return GetLegacySupervisedUserMessage(); 397 return GetLegacySupervisedUserMessage();
398 } 398 }
399 399
400 bool SystemTrayDelegateChromeOS::IsUserSupervised() const { 400 bool SystemTrayDelegateChromeOS::IsUserSupervised() const {
401 user_manager::User* user = user_manager::UserManager::Get()->GetActiveUser(); 401 user_manager::User* user = user_manager::UserManager::Get()->GetActiveUser();
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
1327 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " 1327 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while "
1328 << "ENABLE_SUPERVISED_USERS undefined."; 1328 << "ENABLE_SUPERVISED_USERS undefined.";
1329 return base::string16(); 1329 return base::string16();
1330 } 1330 }
1331 1331
1332 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1332 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1333 return new SystemTrayDelegateChromeOS(); 1333 return new SystemTrayDelegateChromeOS();
1334 } 1334 }
1335 1335
1336 } // namespace chromeos 1336 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_chromeos.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698