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

Side by Side Diff: chrome/browser/chromeos/file_manager/app_installer.cc

Issue 384823002: Introduce a stable set of errors for inline install (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replace printf with vlog(1) in unrelated code so it passes presubmit Created 6 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/chromeos/file_manager/app_installer.h" 5 #include "chrome/browser/chromeos/file_manager/app_installer.h"
6 6
7 #include "chrome/common/extensions/webstore_install_result.h"
7 #include "content/public/browser/web_contents.h" 8 #include "content/public/browser/web_contents.h"
8 #include "content/public/browser/web_contents_observer.h" 9 #include "content/public/browser/web_contents_observer.h"
9 10
10 namespace file_manager { 11 namespace file_manager {
11 12
12 namespace { 13 namespace {
13 const char kWebContentsDestroyedError[] = "WebContents is destroyed."; 14 const char kWebContentsDestroyedError[] = "WebContents is destroyed.";
14 } // namespace 15 } // namespace
15 16
16 class AppInstaller::WebContentsObserver : public content::WebContentsObserver { 17 class AppInstaller::WebContentsObserver : public content::WebContentsObserver {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 bool AppInstaller::CheckRequestorPermitted( 90 bool AppInstaller::CheckRequestorPermitted(
90 const base::DictionaryValue& webstore_data, 91 const base::DictionaryValue& webstore_data,
91 std::string* error) const { 92 std::string* error) const {
92 DCHECK(error != NULL); 93 DCHECK(error != NULL);
93 DCHECK(error->empty()); 94 DCHECK(error->empty());
94 return true; 95 return true;
95 } 96 }
96 97
97 void AppInstaller::OnWebContentsDestroyed( 98 void AppInstaller::OnWebContentsDestroyed(
98 content::WebContents* web_contents) { 99 content::WebContents* web_contents) {
99 callback_.Run(false, kWebContentsDestroyedError); 100 callback_.Run(false,
101 kWebContentsDestroyedError,
102 extensions::webstore_install::OTHER_ERROR);
100 AbortInstall(); 103 AbortInstall();
101 } 104 }
102 105
103 } // namespace file_manager 106 } // namespace file_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698