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

Side by Side Diff: trunk/src/chrome/browser/ui/views/extensions/bookmark_app_bubble_view.cc

Issue 369863002: Revert 281130 "Replace "external_install" boolean parameter with..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/views/extensions/bookmark_app_bubble_view.h" 5 #include "chrome/browser/ui/views/extensions/bookmark_app_bubble_view.h"
6 6
7 #include "base/strings/string16.h" 7 #include "base/strings/string16.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/extensions/app_icon_loader_impl.h" 9 #include "chrome/browser/extensions/app_icon_loader_impl.h"
10 #include "chrome/browser/extensions/bookmark_app_helper.h" 10 #include "chrome/browser/extensions/bookmark_app_helper.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 200
201 void BookmarkAppBubbleView::WindowClosing() { 201 void BookmarkAppBubbleView::WindowClosing() {
202 // We have to reset |bookmark_app_bubble_| here, not in our destructor, 202 // We have to reset |bookmark_app_bubble_| here, not in our destructor,
203 // because we'll be destroyed asynchronously and the shown state will be 203 // because we'll be destroyed asynchronously and the shown state will be
204 // checked before then. 204 // checked before then.
205 DCHECK_EQ(bookmark_app_bubble_, this); 205 DCHECK_EQ(bookmark_app_bubble_, this);
206 bookmark_app_bubble_ = NULL; 206 bookmark_app_bubble_ = NULL;
207 207
208 if (remove_app_) { 208 if (remove_app_) {
209 GetExtensionService(profile_)->UninstallExtension( 209 GetExtensionService(profile_)->UninstallExtension(
210 extension_id_, 210 extension_id_, false, NULL);
211 ExtensionService::UNINSTALL_REASON_INTERNAL_MANAGEMENT,
212 NULL);
213 } else { 211 } else {
214 ApplyEdits(); 212 ApplyEdits();
215 } 213 }
216 } 214 }
217 215
218 bool BookmarkAppBubbleView::AcceleratorPressed( 216 bool BookmarkAppBubbleView::AcceleratorPressed(
219 const ui::Accelerator& accelerator) { 217 const ui::Accelerator& accelerator) {
220 if (accelerator.key_code() == ui::VKEY_RETURN) { 218 if (accelerator.key_code() == ui::VKEY_RETURN) {
221 HandleButtonPressed(add_button_); 219 HandleButtonPressed(add_button_);
222 } 220 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 if (extension && base::UTF8ToUTF16(extension->name()) == title_tf_->text()) 265 if (extension && base::UTF8ToUTF16(extension->name()) == title_tf_->text())
268 return; 266 return;
269 267
270 // Reinstall the app with an updated name. 268 // Reinstall the app with an updated name.
271 WebApplicationInfo install_info(web_app_info_); 269 WebApplicationInfo install_info(web_app_info_);
272 install_info.title = title_tf_->text(); 270 install_info.title = title_tf_->text();
273 271
274 extensions::CreateOrUpdateBookmarkApp(GetExtensionService(profile_), 272 extensions::CreateOrUpdateBookmarkApp(GetExtensionService(profile_),
275 install_info); 273 install_info);
276 } 274 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698