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

Side by Side Diff: chrome/browser/extensions/extension_install_prompt.cc

Issue 10683003: Moved CrxInstaller and CrxInstallerError into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
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/extensions/extension_install_prompt.h" 5 #include "chrome/browser/extensions/extension_install_prompt.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 } 365 }
366 366
367 void ExtensionInstallPrompt::OnInstallSuccess(const Extension* extension, 367 void ExtensionInstallPrompt::OnInstallSuccess(const Extension* extension,
368 SkBitmap* icon) { 368 SkBitmap* icon) {
369 extension_ = extension; 369 extension_ = extension;
370 SetIcon(icon); 370 SetIcon(icon);
371 371
372 install_ui_->OnInstallSuccess(extension, &icon_); 372 install_ui_->OnInstallSuccess(extension, &icon_);
373 } 373 }
374 374
375 void ExtensionInstallPrompt::OnInstallFailure(const CrxInstallerError& error) { 375 void ExtensionInstallPrompt::OnInstallFailure(
376 const extensions::CrxInstallerError& error) {
376 install_ui_->OnInstallFailure(error); 377 install_ui_->OnInstallFailure(error);
377 } 378 }
378 379
379 void ExtensionInstallPrompt::SetIcon(const SkBitmap* image) { 380 void ExtensionInstallPrompt::SetIcon(const SkBitmap* image) {
380 if (image) 381 if (image)
381 icon_ = *image; 382 icon_ = *image;
382 else 383 else
383 icon_ = SkBitmap(); 384 icon_ = SkBitmap();
384 if (icon_.empty()) 385 if (icon_.empty())
385 icon_ = Extension::GetDefaultIcon(extension_->is_app()); 386 icon_ = Extension::GetDefaultIcon(extension_->is_app());
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 NOTREACHED() << "Unknown message"; 472 NOTREACHED() << "Unknown message";
472 break; 473 break;
473 } 474 }
474 } 475 }
475 476
476 // static 477 // static
477 bool ExtensionInstallPrompt::ShouldAutomaticallyApproveScopes() { 478 bool ExtensionInstallPrompt::ShouldAutomaticallyApproveScopes() {
478 return !CommandLine::ForCurrentProcess()->HasSwitch( 479 return !CommandLine::ForCurrentProcess()->HasSwitch(
479 switches::kDemandUserScopeApproval); 480 switches::kDemandUserScopeApproval);
480 } 481 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698