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

Side by Side Diff: chrome/browser/ui/webui/options/extension_settings_handler.cc

Issue 9234076: Implementation of the Extension Activity Log UI behind a flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address remaining comments. Created 8 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/webui/extensions/extension_activity_ui.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ui/webui/options/extension_settings_handler.h" 5 #include "chrome/browser/ui/webui/options/extension_settings_handler.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/base64.h" 8 #include "base/base64.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 localized_strings->SetString("extensionSettingsEnableIncognito", 541 localized_strings->SetString("extensionSettingsEnableIncognito",
542 l10n_util::GetStringUTF16(IDS_EXTENSIONS_ENABLE_INCOGNITO)); 542 l10n_util::GetStringUTF16(IDS_EXTENSIONS_ENABLE_INCOGNITO));
543 localized_strings->SetString("extensionSettingsAllowFileAccess", 543 localized_strings->SetString("extensionSettingsAllowFileAccess",
544 l10n_util::GetStringUTF16(IDS_EXTENSIONS_ALLOW_FILE_ACCESS)); 544 l10n_util::GetStringUTF16(IDS_EXTENSIONS_ALLOW_FILE_ACCESS));
545 localized_strings->SetString("extensionSettingsIncognitoWarning", 545 localized_strings->SetString("extensionSettingsIncognitoWarning",
546 l10n_util::GetStringUTF16(IDS_EXTENSIONS_INCOGNITO_WARNING)); 546 l10n_util::GetStringUTF16(IDS_EXTENSIONS_INCOGNITO_WARNING));
547 localized_strings->SetString("extensionSettingsReload", 547 localized_strings->SetString("extensionSettingsReload",
548 l10n_util::GetStringUTF16(IDS_EXTENSIONS_RELOAD)); 548 l10n_util::GetStringUTF16(IDS_EXTENSIONS_RELOAD));
549 localized_strings->SetString("extensionSettingsOptions", 549 localized_strings->SetString("extensionSettingsOptions",
550 l10n_util::GetStringUTF16(IDS_EXTENSIONS_OPTIONS_LINK)); 550 l10n_util::GetStringUTF16(IDS_EXTENSIONS_OPTIONS_LINK));
551 localized_strings->SetString("extensionSettingsActivity",
552 l10n_util::GetStringUTF16(IDS_EXTENSIONS_ACTIVITY_LINK));
551 localized_strings->SetString("extensionSettingsPolicyControlled", 553 localized_strings->SetString("extensionSettingsPolicyControlled",
552 l10n_util::GetStringUTF16(IDS_EXTENSIONS_POLICY_CONTROLLED)); 554 l10n_util::GetStringUTF16(IDS_EXTENSIONS_POLICY_CONTROLLED));
553 localized_strings->SetString("extensionSettingsShowButton", 555 localized_strings->SetString("extensionSettingsShowButton",
554 l10n_util::GetStringUTF16(IDS_EXTENSIONS_SHOW_BUTTON)); 556 l10n_util::GetStringUTF16(IDS_EXTENSIONS_SHOW_BUTTON));
555 localized_strings->SetString("extensionSettingsLoadUnpackedButton", 557 localized_strings->SetString("extensionSettingsLoadUnpackedButton",
556 l10n_util::GetStringUTF16(IDS_EXTENSIONS_LOAD_UNPACKED_BUTTON)); 558 l10n_util::GetStringUTF16(IDS_EXTENSIONS_LOAD_UNPACKED_BUTTON));
557 localized_strings->SetString("extensionSettingsPackButton", 559 localized_strings->SetString("extensionSettingsPackButton",
558 l10n_util::GetStringUTF16(IDS_EXTENSIONS_PACK_BUTTON)); 560 l10n_util::GetStringUTF16(IDS_EXTENSIONS_PACK_BUTTON));
559 localized_strings->SetString("extensionSettingsUpdateButton", 561 localized_strings->SetString("extensionSettingsUpdateButton",
560 l10n_util::GetStringUTF16(IDS_EXTENSIONS_UPDATE_BUTTON)); 562 l10n_util::GetStringUTF16(IDS_EXTENSIONS_UPDATE_BUTTON));
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 extension->location() == Extension::LOAD); 661 extension->location() == Extension::LOAD);
660 extension_data->SetBoolean("mayDisable", 662 extension_data->SetBoolean("mayDisable",
661 Extension::UserMayDisable(extension->location())); 663 Extension::UserMayDisable(extension->location()));
662 extension_data->SetBoolean("enabled", enabled); 664 extension_data->SetBoolean("enabled", enabled);
663 extension_data->SetBoolean("terminated", terminated); 665 extension_data->SetBoolean("terminated", terminated);
664 extension_data->SetBoolean("enabledIncognito", 666 extension_data->SetBoolean("enabledIncognito",
665 service ? service->IsIncognitoEnabled(extension->id()) : false); 667 service ? service->IsIncognitoEnabled(extension->id()) : false);
666 extension_data->SetBoolean("wantsFileAccess", extension->wants_file_access()); 668 extension_data->SetBoolean("wantsFileAccess", extension->wants_file_access());
667 extension_data->SetBoolean("allowFileAccess", 669 extension_data->SetBoolean("allowFileAccess",
668 service ? service->AllowFileAccess(extension) : false); 670 service ? service->AllowFileAccess(extension) : false);
671 extension_data->SetBoolean("allow_activity",
672 enabled && CommandLine::ForCurrentProcess()->HasSwitch(
673 switches::kEnableExtensionActivityUI));
669 extension_data->SetBoolean("allow_reload", 674 extension_data->SetBoolean("allow_reload",
670 extension->location() == Extension::LOAD); 675 extension->location() == Extension::LOAD);
671 extension_data->SetBoolean("is_hosted_app", extension->is_hosted_app()); 676 extension_data->SetBoolean("is_hosted_app", extension->is_hosted_app());
672 677
673 // Determine the sort order: Extensions loaded through --load-extensions show 678 // Determine the sort order: Extensions loaded through --load-extensions show
674 // up at the top. Disabled extensions show up at the bottom. 679 // up at the top. Disabled extensions show up at the bottom.
675 if (extension->location() == Extension::LOAD) 680 if (extension->location() == Extension::LOAD)
676 extension_data->SetInteger("order", 1); 681 extension_data->SetInteger("order", 1);
677 else 682 else
678 extension_data->SetInteger("order", 2); 683 extension_data->SetInteger("order", 2);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 chrome::VIEW_TYPE_EXTENSION_DIALOG == host_type) 766 chrome::VIEW_TYPE_EXTENSION_DIALOG == host_type)
762 continue; 767 continue;
763 768
764 GURL url = host->delegate()->GetURL(); 769 GURL url = host->delegate()->GetURL();
765 content::RenderProcessHost* process = host->process(); 770 content::RenderProcessHost* process = host->process();
766 result->push_back( 771 result->push_back(
767 ExtensionPage(url, process->GetID(), host->routing_id(), 772 ExtensionPage(url, process->GetID(), host->routing_id(),
768 process->GetBrowserContext()->IsOffTheRecord())); 773 process->GetBrowserContext()->IsOffTheRecord()));
769 } 774 }
770 } 775 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/extensions/extension_activity_ui.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698