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

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

Issue 1497193002: Remove all the ephemeral apps code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self review, Devlin review. Created 5 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_service_test_with_install.h" 5 #include "chrome/browser/extensions/extension_service_test_with_install.h"
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/extensions/crx_installer.h" 9 #include "chrome/browser/extensions/crx_installer.h"
10 #include "chrome/browser/extensions/extension_creator.h" 10 #include "chrome/browser/extensions/extension_creator.h"
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 // are manually calling clear() on loaded_, so this isn't doable. 392 // are manually calling clear() on loaded_, so this isn't doable.
393 if (i == loaded_.end()) 393 if (i == loaded_.end())
394 return; 394 return;
395 loaded_.erase(i); 395 loaded_.erase(i);
396 } 396 }
397 397
398 void ExtensionServiceTestWithInstall::OnExtensionWillBeInstalled( 398 void ExtensionServiceTestWithInstall::OnExtensionWillBeInstalled(
399 content::BrowserContext* browser_context, 399 content::BrowserContext* browser_context,
400 const Extension* extension, 400 const Extension* extension,
401 bool is_update, 401 bool is_update,
402 bool from_ephemeral,
403 const std::string& old_name) { 402 const std::string& old_name) {
404 installed_ = extension; 403 installed_ = extension;
405 was_update_ = is_update; 404 was_update_ = is_update;
406 old_name_ = old_name; 405 old_name_ = old_name;
407 } 406 }
408 407
409 // Create a CrxInstaller and install the CRX file. 408 // Create a CrxInstaller and install the CRX file.
410 // Instead of calling this method yourself, use InstallCRX(), which does extra 409 // Instead of calling this method yourself, use InstallCRX(), which does extra
411 // error checking. 410 // error checking.
412 void ExtensionServiceTestWithInstall::InstallCRXInternal( 411 void ExtensionServiceTestWithInstall::InstallCRXInternal(
(...skipping 10 matching lines...) Expand all
423 content::WindowedNotificationObserver observer( 422 content::WindowedNotificationObserver observer(
424 extensions::NOTIFICATION_CRX_INSTALLER_DONE, 423 extensions::NOTIFICATION_CRX_INSTALLER_DONE,
425 content::Source<extensions::CrxInstaller>(installer.get())); 424 content::Source<extensions::CrxInstaller>(installer.get()));
426 425
427 installer->InstallCrx(crx_path); 426 installer->InstallCrx(crx_path);
428 427
429 observer.Wait(); 428 observer.Wait();
430 } 429 }
431 430
432 } // namespace extensions 431 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698