| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 } else { | 114 } else { |
| 115 for (extensions::ExtensionList::const_iterator cursor = | 115 for (extensions::ExtensionList::const_iterator cursor = |
| 116 applications_->begin(); | 116 applications_->begin(); |
| 117 cursor != applications_->end(); | 117 cursor != applications_->end(); |
| 118 ++cursor, ++position) { | 118 ++cursor, ++position) { |
| 119 const gfx::ImageSkia* icon = applications_->GetIcon(*cursor); | 119 const gfx::ImageSkia* icon = applications_->GetIcon(*cursor); |
| 120 DCHECK(position == applications_->GetPosition(*cursor)); | 120 DCHECK(position == applications_->GetPosition(*cursor)); |
| 121 const std::string& name = (*cursor)->name(); | 121 const std::string& name = (*cursor)->name(); |
| 122 menu->AddItem(position, UTF8ToUTF16(name)); | 122 menu->AddItem(position, UTF8ToUTF16(name)); |
| 123 if (icon) | 123 if (icon) |
| 124 menu->SetIcon(menu->GetItemCount() - 1, *icon); | 124 menu->SetIcon(menu->GetItemCount() - 1, gfx::Image(*icon)); |
| 125 } | 125 } |
| 126 } | 126 } |
| 127 if (containing_menu) | 127 if (containing_menu) |
| 128 containing_menu->AddSubMenu(command_id_, name_, menu); | 128 containing_menu->AddSubMenu(command_id_, name_, menu); |
| 129 } | 129 } |
| 130 | 130 |
| 131 void BackgroundModeManager::BackgroundModeData::SetName( | 131 void BackgroundModeManager::BackgroundModeData::SetName( |
| 132 const string16& new_profile_name) { | 132 const string16& new_profile_name) { |
| 133 name_ = new_profile_name; | 133 name_ = new_profile_name; |
| 134 } | 134 } |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 } | 772 } |
| 773 } | 773 } |
| 774 return profile_it; | 774 return profile_it; |
| 775 } | 775 } |
| 776 | 776 |
| 777 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { | 777 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { |
| 778 PrefService* service = g_browser_process->local_state(); | 778 PrefService* service = g_browser_process->local_state(); |
| 779 DCHECK(service); | 779 DCHECK(service); |
| 780 return service->GetBoolean(prefs::kBackgroundModeEnabled); | 780 return service->GetBoolean(prefs::kBackgroundModeEnabled); |
| 781 } | 781 } |
| OLD | NEW |