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

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

Issue 15812004: Remove the Activity Log UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
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/extensions/extension_settings_handler.h" 5 #include "chrome/browser/ui/webui/extensions/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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 Manifest::IsUnpackedLocation(extension->location())); 153 Manifest::IsUnpackedLocation(extension->location()));
154 extension_data->SetBoolean("terminated", 154 extension_data->SetBoolean("terminated",
155 extension_service_->terminated_extensions()->Contains(extension->id())); 155 extension_service_->terminated_extensions()->Contains(extension->id()));
156 extension_data->SetBoolean("enabledIncognito", 156 extension_data->SetBoolean("enabledIncognito",
157 extension_service_->IsIncognitoEnabled(extension->id())); 157 extension_service_->IsIncognitoEnabled(extension->id()));
158 extension_data->SetBoolean("incognitoCanBeEnabled", 158 extension_data->SetBoolean("incognitoCanBeEnabled",
159 extension->can_be_incognito_enabled()); 159 extension->can_be_incognito_enabled());
160 extension_data->SetBoolean("wantsFileAccess", extension->wants_file_access()); 160 extension_data->SetBoolean("wantsFileAccess", extension->wants_file_access());
161 extension_data->SetBoolean("allowFileAccess", 161 extension_data->SetBoolean("allowFileAccess",
162 extension_service_->AllowFileAccess(extension)); 162 extension_service_->AllowFileAccess(extension));
163 extension_data->SetBoolean("allow_activity",
164 enabled && CommandLine::ForCurrentProcess()->HasSwitch(
165 switches::kEnableExtensionActivityUI));
166 extension_data->SetBoolean("allow_reload", 163 extension_data->SetBoolean("allow_reload",
167 Manifest::IsUnpackedLocation(extension->location())); 164 Manifest::IsUnpackedLocation(extension->location()));
168 extension_data->SetBoolean("is_hosted_app", extension->is_hosted_app()); 165 extension_data->SetBoolean("is_hosted_app", extension->is_hosted_app());
169 extension_data->SetBoolean("is_platform_app", extension->is_platform_app()); 166 extension_data->SetBoolean("is_platform_app", extension->is_platform_app());
170 extension_data->SetBoolean("homepageProvided", 167 extension_data->SetBoolean("homepageProvided",
171 extensions::ManifestURL::GetHomepageURL(extension).is_valid()); 168 extensions::ManifestURL::GetHomepageURL(extension).is_valid());
172 169
173 string16 location_text; 170 string16 location_text;
174 if (extension->location() == Manifest::INTERNAL && 171 if (extension->location() == Manifest::INTERNAL &&
175 !extension->UpdatesFromGallery()) { 172 !extension->UpdatesFromGallery()) {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 source->AddString("extensionSettingsLaunch", 298 source->AddString("extensionSettingsLaunch",
302 l10n_util::GetStringUTF16(IDS_EXTENSIONS_LAUNCH)); 299 l10n_util::GetStringUTF16(IDS_EXTENSIONS_LAUNCH));
303 source->AddString("extensionSettingsRestart", 300 source->AddString("extensionSettingsRestart",
304 l10n_util::GetStringUTF16(IDS_EXTENSIONS_RESTART)); 301 l10n_util::GetStringUTF16(IDS_EXTENSIONS_RESTART));
305 source->AddString("extensionSettingsReloadUnpacked", 302 source->AddString("extensionSettingsReloadUnpacked",
306 l10n_util::GetStringUTF16(IDS_EXTENSIONS_RELOAD_UNPACKED)); 303 l10n_util::GetStringUTF16(IDS_EXTENSIONS_RELOAD_UNPACKED));
307 source->AddString("extensionSettingsOptions", 304 source->AddString("extensionSettingsOptions",
308 l10n_util::GetStringUTF16(IDS_EXTENSIONS_OPTIONS_LINK)); 305 l10n_util::GetStringUTF16(IDS_EXTENSIONS_OPTIONS_LINK));
309 source->AddString("extensionSettingsPermissions", 306 source->AddString("extensionSettingsPermissions",
310 l10n_util::GetStringUTF16(IDS_EXTENSIONS_PERMISSIONS_LINK)); 307 l10n_util::GetStringUTF16(IDS_EXTENSIONS_PERMISSIONS_LINK));
311 source->AddString("extensionSettingsActivity",
312 l10n_util::GetStringUTF16(IDS_EXTENSIONS_ACTIVITY_LINK));
313 source->AddString("extensionSettingsVisitWebsite", 308 source->AddString("extensionSettingsVisitWebsite",
314 l10n_util::GetStringUTF16(IDS_EXTENSIONS_VISIT_WEBSITE)); 309 l10n_util::GetStringUTF16(IDS_EXTENSIONS_VISIT_WEBSITE));
315 source->AddString("extensionSettingsVisitWebStore", 310 source->AddString("extensionSettingsVisitWebStore",
316 l10n_util::GetStringUTF16(IDS_EXTENSIONS_VISIT_WEBSTORE)); 311 l10n_util::GetStringUTF16(IDS_EXTENSIONS_VISIT_WEBSTORE));
317 source->AddString("extensionSettingsPolicyControlled", 312 source->AddString("extensionSettingsPolicyControlled",
318 l10n_util::GetStringUTF16(IDS_EXTENSIONS_POLICY_CONTROLLED)); 313 l10n_util::GetStringUTF16(IDS_EXTENSIONS_POLICY_CONTROLLED));
319 source->AddString("extensionSettingsManagedMode", 314 source->AddString("extensionSettingsManagedMode",
320 l10n_util::GetStringUTF16(IDS_EXTENSIONS_LOCKED_MANAGED_MODE)); 315 l10n_util::GetStringUTF16(IDS_EXTENSIONS_LOCKED_MANAGED_MODE));
321 source->AddString("sideloadWipeoutUrl", 316 source->AddString("sideloadWipeoutUrl",
322 chrome::kSideloadWipeoutHelpURL); 317 chrome::kSideloadWipeoutHelpURL);
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 std::vector<std::string> requirement_errors) { 1035 std::vector<std::string> requirement_errors) {
1041 if (requirement_errors.empty()) { 1036 if (requirement_errors.empty()) {
1042 extension_service_->EnableExtension(extension_id); 1037 extension_service_->EnableExtension(extension_id);
1043 } else { 1038 } else {
1044 ExtensionErrorReporter::GetInstance()->ReportError( 1039 ExtensionErrorReporter::GetInstance()->ReportError(
1045 UTF8ToUTF16(JoinString(requirement_errors, ' ')), 1040 UTF8ToUTF16(JoinString(requirement_errors, ' ')),
1046 true /* be noisy */); 1041 true /* be noisy */);
1047 } 1042 }
1048 requirements_checker_.reset(); 1043 requirements_checker_.reset();
1049 } 1044 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/extensions/extension_activity_ui.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698