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

Side by Side Diff: chrome/browser/extensions/api/system_indicator/system_indicator_manager.cc

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Rebase Created 3 years, 7 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
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 "chrome/browser/extensions/api/system_indicator/system_indicator_manage r.h" 5 #include "chrome/browser/extensions/api/system_indicator/system_indicator_manage r.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/extensions/extension_action.h" 10 #include "chrome/browser/extensions/extension_action.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 DCHECK(thread_checker_.CalledOnValidThread()); 130 DCHECK(thread_checker_.CalledOnValidThread());
131 } 131 }
132 132
133 void SystemIndicatorManager::Shutdown() { 133 void SystemIndicatorManager::Shutdown() {
134 DCHECK(thread_checker_.CalledOnValidThread()); 134 DCHECK(thread_checker_.CalledOnValidThread());
135 } 135 }
136 136
137 void SystemIndicatorManager::OnExtensionUnloaded( 137 void SystemIndicatorManager::OnExtensionUnloaded(
138 content::BrowserContext* browser_context, 138 content::BrowserContext* browser_context,
139 const Extension* extension, 139 const Extension* extension,
140 UnloadedExtensionInfo::Reason reason) { 140 UnloadedExtensionReason reason) {
141 RemoveIndicator(extension->id()); 141 RemoveIndicator(extension->id());
142 } 142 }
143 143
144 void SystemIndicatorManager::OnExtensionActionUpdated( 144 void SystemIndicatorManager::OnExtensionActionUpdated(
145 ExtensionAction* extension_action, 145 ExtensionAction* extension_action,
146 content::WebContents* web_contents, 146 content::WebContents* web_contents,
147 content::BrowserContext* browser_context) { 147 content::BrowserContext* browser_context) {
148 DCHECK(thread_checker_.CalledOnValidThread()); 148 DCHECK(thread_checker_.CalledOnValidThread());
149 if (profile_->GetOriginalProfile() != browser_context || 149 if (profile_->GetOriginalProfile() != browser_context ||
150 extension_action->action_type() != ActionInfo::TYPE_SYSTEM_INDICATOR) 150 extension_action->action_type() != ActionInfo::TYPE_SYSTEM_INDICATOR)
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 if (extension_icon) 189 if (extension_icon)
190 system_indicators_[extension->id()] = std::move(extension_icon); 190 system_indicators_[extension->id()] = std::move(extension_icon);
191 } 191 }
192 192
193 void SystemIndicatorManager::RemoveIndicator(const std::string& extension_id) { 193 void SystemIndicatorManager::RemoveIndicator(const std::string& extension_id) {
194 DCHECK(thread_checker_.CalledOnValidThread()); 194 DCHECK(thread_checker_.CalledOnValidThread());
195 system_indicators_.erase(extension_id); 195 system_indicators_.erase(extension_id);
196 } 196 }
197 197
198 } // namespace extensions 198 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698