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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc

Issue 437593006: Video Player: Install the cast API extension if it is not installed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added TODO comment 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/extensions/file_manager/private_api_misc.h" 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_misc.h"
6 6
7 #include "apps/app_window.h" 7 #include "apps/app_window.h"
8 #include "apps/app_window_registry.h" 8 #include "apps/app_window_registry.h"
9 #include "ash/frame/frame_util.h" 9 #include "ash/frame/frame_util.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 263
264 if (params->item_id.empty()) 264 if (params->item_id.empty())
265 return false; 265 return false;
266 266
267 const extensions::WebstoreStandaloneInstaller::Callback callback = 267 const extensions::WebstoreStandaloneInstaller::Callback callback =
268 base::Bind( 268 base::Bind(
269 &FileBrowserPrivateInstallWebstoreItemFunction::OnInstallComplete, 269 &FileBrowserPrivateInstallWebstoreItemFunction::OnInstallComplete,
270 this); 270 this);
271 271
272 scoped_refptr<file_manager::AppInstaller> installer( 272 scoped_refptr<file_manager::AppInstaller> installer(
273 new file_manager::AppInstaller( 273 new file_manager::AppInstaller(GetAssociatedWebContents(),
274 GetAssociatedWebContents(), 274 params->item_id,
275 params->item_id, 275 GetProfile(),
276 GetProfile(), 276 params->silent_installation,
277 callback)); 277 callback));
278 // installer will be AddRef()'d in BeginInstall(). 278 // installer will be AddRef()'d in BeginInstall().
279 installer->BeginInstall(); 279 installer->BeginInstall();
280 return true; 280 return true;
281 } 281 }
282 282
283 void FileBrowserPrivateInstallWebstoreItemFunction::OnInstallComplete( 283 void FileBrowserPrivateInstallWebstoreItemFunction::OnInstallComplete(
284 bool success, 284 bool success,
285 const std::string& error, 285 const std::string& error,
286 extensions::webstore_install::Result result) { 286 extensions::webstore_install::Result result) {
287 drive::EventLogger* logger = file_manager::util::GetLogger(GetProfile()); 287 drive::EventLogger* logger = file_manager::util::GetLogger(GetProfile());
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 NOTREACHED(); 470 NOTREACHED();
471 SetError( 471 SetError(
472 base::StringPrintf("Unexpected inspection type(%d) is specified.", 472 base::StringPrintf("Unexpected inspection type(%d) is specified.",
473 static_cast<int>(params->type))); 473 static_cast<int>(params->type)));
474 return false; 474 return false;
475 } 475 }
476 return true; 476 return true;
477 } 477 }
478 478
479 } // namespace extensions 479 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698