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

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

Powered by Google App Engine
This is Rietveld 408576698