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

Side by Side Diff: chrome/browser/extensions/api/developer_private/extension_info_generator.cc

Issue 2898203004: [Extensions] Remove "show button" UI from chrome://extensions (Closed)
Patch Set: Dan's Created 3 years, 6 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/developer_private/extension_info_generat or.h" 5 #include "chrome/browser/extensions/api/developer_private/extension_info_generat or.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 callback_ = callback; 304 callback_ = callback;
305 } 305 }
306 } 306 }
307 307
308 void ExtensionInfoGenerator::CreateExtensionInfoHelper( 308 void ExtensionInfoGenerator::CreateExtensionInfoHelper(
309 const Extension& extension, 309 const Extension& extension,
310 developer::ExtensionState state) { 310 developer::ExtensionState state) {
311 std::unique_ptr<developer::ExtensionInfo> info( 311 std::unique_ptr<developer::ExtensionInfo> info(
312 new developer::ExtensionInfo()); 312 new developer::ExtensionInfo());
313 313
314 // Don't consider the button hidden with the redesign, because "hidden"
315 // buttons are now just hidden in the wrench menu.
316 info->action_button_hidden =
317 !extension_action_api_->GetBrowserActionVisibility(extension.id()) &&
318 !FeatureSwitch::extension_action_redesign()->IsEnabled();
319
320 // Blacklist text. 314 // Blacklist text.
321 int blacklist_text = -1; 315 int blacklist_text = -1;
322 switch (extension_prefs_->GetExtensionBlacklistState(extension.id())) { 316 switch (extension_prefs_->GetExtensionBlacklistState(extension.id())) {
323 case BLACKLISTED_MALWARE: 317 case BLACKLISTED_MALWARE:
324 blacklist_text = IDS_OPTIONS_BLACKLISTED_MALWARE; 318 blacklist_text = IDS_OPTIONS_BLACKLISTED_MALWARE;
325 break; 319 break;
326 case BLACKLISTED_SECURITY_VULNERABILITY: 320 case BLACKLISTED_SECURITY_VULNERABILITY:
327 blacklist_text = IDS_OPTIONS_BLACKLISTED_SECURITY_VULNERABILITY; 321 blacklist_text = IDS_OPTIONS_BLACKLISTED_SECURITY_VULNERABILITY;
328 break; 322 break;
329 case BLACKLISTED_CWS_POLICY_VIOLATION: 323 case BLACKLISTED_CWS_POLICY_VIOLATION:
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 632
639 if (pending_image_loads_ == 0) { // All done! 633 if (pending_image_loads_ == 0) { // All done!
640 ExtensionInfoList list = std::move(list_); 634 ExtensionInfoList list = std::move(list_);
641 list_.clear(); 635 list_.clear();
642 base::ResetAndReturn(&callback_).Run(std::move(list)); 636 base::ResetAndReturn(&callback_).Run(std::move(list));
643 // WARNING: |this| is possibly deleted after this line! 637 // WARNING: |this| is possibly deleted after this line!
644 } 638 }
645 } 639 }
646 640
647 } // namespace extensions 641 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698