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

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

Issue 899173002: Replace Webstore link with app info dialog link in chrome://apps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reformat Created 5 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
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 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 BrokerDelegate* broker_delegate = new BrokerDelegate(AsWeakPtr()); 1240 BrokerDelegate* broker_delegate = new BrokerDelegate(AsWeakPtr());
1241 1241
1242 // Show the new-style extensions dialog when the flag is set. The flag cannot 1242 // Show the new-style extensions dialog when the flag is set. The flag cannot
1243 // be set on Mac platforms. 1243 // be set on Mac platforms.
1244 if (ShouldDisplayExtensionInfoDialog()) { 1244 if (ShouldDisplayExtensionInfoDialog()) {
1245 UMA_HISTOGRAM_ENUMERATION("Apps.AppInfoDialog.Launches", 1245 UMA_HISTOGRAM_ENUMERATION("Apps.AppInfoDialog.Launches",
1246 AppInfoLaunchSource::FROM_EXTENSIONS_PAGE, 1246 AppInfoLaunchSource::FROM_EXTENSIONS_PAGE,
1247 AppInfoLaunchSource::NUM_LAUNCH_SOURCES); 1247 AppInfoLaunchSource::NUM_LAUNCH_SOURCES);
1248 1248
1249 // Display the dialog at a size similar to the app list. 1249 // Display the dialog at a size similar to the app list.
1250 const int kAppInfoDialogWidth = 380;
1251 const int kAppInfoDialogHeight = 490;
1252
1253 ShowAppInfoInNativeDialog( 1250 ShowAppInfoInNativeDialog(
1254 web_contents()->GetTopLevelNativeWindow(), 1251 web_contents()->GetTopLevelNativeWindow(),
1255 gfx::Size(kAppInfoDialogWidth, kAppInfoDialogHeight), 1252 GetAppInfoNativeDialogSize(),
1256 Profile::FromWebUI(web_ui()), extension, 1253 Profile::FromWebUI(web_ui()), extension,
1257 base::Bind(&BrokerDelegate::AppInfoDialogClosed, 1254 base::Bind(&BrokerDelegate::AppInfoDialogClosed,
1258 base::Unretained(broker_delegate))); 1255 base::Unretained(broker_delegate)));
1259 } else { 1256 } else {
1260 prompt_.reset(new ExtensionInstallPrompt(web_contents())); 1257 prompt_.reset(new ExtensionInstallPrompt(web_contents()));
1261 std::vector<base::FilePath> retained_file_paths; 1258 std::vector<base::FilePath> retained_file_paths;
1262 if (extension->permissions_data()->HasAPIPermission( 1259 if (extension->permissions_data()->HasAPIPermission(
1263 APIPermission::kFileSystem)) { 1260 APIPermission::kFileSystem)) {
1264 std::vector<apps::SavedFileEntry> retained_file_entries = 1261 std::vector<apps::SavedFileEntry> retained_file_entries =
1265 apps::SavedFilesService::Get(Profile::FromWebUI(web_ui())) 1262 apps::SavedFilesService::Get(Profile::FromWebUI(web_ui()))
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
1531 extension_service_->EnableExtension(extension_id); 1528 extension_service_->EnableExtension(extension_id);
1532 } else { 1529 } else {
1533 ExtensionErrorReporter::GetInstance()->ReportError( 1530 ExtensionErrorReporter::GetInstance()->ReportError(
1534 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), 1531 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')),
1535 true); // Be noisy. 1532 true); // Be noisy.
1536 } 1533 }
1537 requirements_checker_.reset(); 1534 requirements_checker_.reset();
1538 } 1535 }
1539 1536
1540 } // namespace extensions 1537 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698