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

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

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/extensions/unpacked_installer.h" 5 #include "chrome/browser/extensions/unpacked_installer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "base/threading/thread_restrictions.h" 11 #include "base/threading/thread_restrictions.h"
12 #include "chrome/browser/extensions/extension_error_reporter.h" 12 #include "chrome/browser/extensions/extension_error_reporter.h"
13 #include "chrome/browser/extensions/extension_install_prompt.h" 13 #include "chrome/browser/extensions/extension_install_prompt.h"
14 #include "chrome/browser/extensions/extension_management.h" 14 #include "chrome/browser/extensions/extension_management.h"
15 #include "chrome/browser/extensions/extension_service.h" 15 #include "chrome/browser/extensions/extension_service.h"
16 #include "chrome/browser/extensions/permissions_updater.h" 16 #include "chrome/browser/extensions/permissions_updater.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/ui/extensions/extension_install_ui_factory.h" 18 #include "chrome/browser/ui/extensions/extension_install_ui_factory.h"
19 #include "chrome/common/extensions/api/plugins/plugins_handler.h" 19 #include "chrome/common/extensions/api/plugins/plugins_handler.h"
20 #include "components/crx_file/id_util.h" 20 #include "components/crx_file/id_util.h"
21 #include "components/sync/api/string_ordinal.h"
21 #include "content/public/browser/browser_thread.h" 22 #include "content/public/browser/browser_thread.h"
22 #include "extensions/browser/extension_prefs.h" 23 #include "extensions/browser/extension_prefs.h"
23 #include "extensions/browser/extension_registry.h" 24 #include "extensions/browser/extension_registry.h"
24 #include "extensions/browser/install/extension_install_ui.h" 25 #include "extensions/browser/install/extension_install_ui.h"
25 #include "extensions/browser/install_flag.h" 26 #include "extensions/browser/install_flag.h"
26 #include "extensions/common/extension.h" 27 #include "extensions/common/extension.h"
27 #include "extensions/common/extension_l10n_util.h" 28 #include "extensions/common/extension_l10n_util.h"
28 #include "extensions/common/file_util.h" 29 #include "extensions/common/file_util.h"
29 #include "extensions/common/manifest.h" 30 #include "extensions/common/manifest.h"
30 #include "extensions/common/manifest_handlers/shared_module_info.h" 31 #include "extensions/common/manifest_handlers/shared_module_info.h"
31 #include "extensions/common/permissions/permissions_data.h" 32 #include "extensions/common/permissions/permissions_data.h"
32 #include "sync/api/string_ordinal.h"
33 33
34 using content::BrowserThread; 34 using content::BrowserThread;
35 using extensions::Extension; 35 using extensions::Extension;
36 using extensions::SharedModuleInfo; 36 using extensions::SharedModuleInfo;
37 37
38 namespace { 38 namespace {
39 39
40 const char kUnpackedExtensionsBlacklistedError[] = 40 const char kUnpackedExtensionsBlacklistedError[] =
41 "Loading of unpacked extensions is disabled by the administrator."; 41 "Loading of unpacked extensions is disabled by the administrator.";
42 42
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 service_weak_->OnExtensionInstalled( 361 service_weak_->OnExtensionInstalled(
362 extension(), syncer::StringOrdinal(), kInstallFlagInstallImmediately); 362 extension(), syncer::StringOrdinal(), kInstallFlagInstallImmediately);
363 363
364 if (!callback_.is_null()) { 364 if (!callback_.is_null()) {
365 callback_.Run(extension(), extension_path_, std::string()); 365 callback_.Run(extension(), extension_path_, std::string());
366 callback_.Reset(); 366 callback_.Reset();
367 } 367 }
368 } 368 }
369 369
370 } // namespace extensions 370 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698