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

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

Issue 664473005: Hide second 'Details' link on extensions page if App Info dialog used (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Small fix for apps Created 6 years, 2 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/ui/webui/extensions/extension_settings_handler.h" 5 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h"
6 6
7 #include "apps/app_load_service.h" 7 #include "apps/app_load_service.h"
8 #include "apps/saved_files_service.h" 8 #include "apps/saved_files_service.h"
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 extension_data->SetBoolean("allow_reload", 282 extension_data->SetBoolean("allow_reload",
283 Manifest::IsUnpackedLocation(extension->location())); 283 Manifest::IsUnpackedLocation(extension->location()));
284 extension_data->SetBoolean("is_hosted_app", extension->is_hosted_app()); 284 extension_data->SetBoolean("is_hosted_app", extension->is_hosted_app());
285 extension_data->SetBoolean("is_platform_app", extension->is_platform_app()); 285 extension_data->SetBoolean("is_platform_app", extension->is_platform_app());
286 extension_data->SetBoolean("homepageProvided", 286 extension_data->SetBoolean("homepageProvided",
287 ManifestURL::SpecifiedHomepageURL(extension)); 287 ManifestURL::SpecifiedHomepageURL(extension));
288 extension_data->SetBoolean("optionsOpenInTab", 288 extension_data->SetBoolean("optionsOpenInTab",
289 OptionsPageInfo::ShouldOpenInTab(extension)); 289 OptionsPageInfo::ShouldOpenInTab(extension));
290 extension_data->SetString("optionsPageHref", 290 extension_data->SetString("optionsPageHref",
291 OptionsPageInfo::GetOptionsPage(extension).spec()); 291 OptionsPageInfo::GetOptionsPage(extension).spec());
292 extension_data->SetBoolean("enableExtensionInfoDialog",
293 CommandLine::ForCurrentProcess()->HasSwitch(
294 switches::kEnableExtensionInfoDialog));
292 295
293 // Add dependent extensions. 296 // Add dependent extensions.
294 base::ListValue* dependents_list = new base::ListValue; 297 base::ListValue* dependents_list = new base::ListValue;
295 if (extension->is_shared_module()) { 298 if (extension->is_shared_module()) {
296 scoped_ptr<ExtensionSet> dependent_extensions = 299 scoped_ptr<ExtensionSet> dependent_extensions =
297 extension_service_->shared_module_service()->GetDependentExtensions( 300 extension_service_->shared_module_service()->GetDependentExtensions(
298 extension); 301 extension);
299 for (ExtensionSet::const_iterator i = dependent_extensions->begin(); 302 for (ExtensionSet::const_iterator i = dependent_extensions->begin();
300 i != dependent_extensions->end(); 303 i != dependent_extensions->end();
301 i++) { 304 i++) {
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1499 extension_service_->EnableExtension(extension_id); 1502 extension_service_->EnableExtension(extension_id);
1500 } else { 1503 } else {
1501 ExtensionErrorReporter::GetInstance()->ReportError( 1504 ExtensionErrorReporter::GetInstance()->ReportError(
1502 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), 1505 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')),
1503 true); // Be noisy. 1506 true); // Be noisy.
1504 } 1507 }
1505 requirements_checker_.reset(); 1508 requirements_checker_.reset();
1506 } 1509 }
1507 1510
1508 } // namespace extensions 1511 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698