OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/webui/extensions/extension_loader_handler.h" | 5 #include "chrome/browser/ui/webui/extensions/extension_loader_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
13 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
15 #include "chrome/browser/extensions/path_util.h" | 15 #include "chrome/browser/extensions/path_util.h" |
16 #include "chrome/browser/extensions/unpacked_installer.h" | 16 #include "chrome/browser/extensions/unpacked_installer.h" |
17 #include "chrome/browser/extensions/zipfile_installer.h" | 17 #include "chrome/browser/extensions/zipfile_installer.h" |
18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
19 #include "chrome/browser/ui/chrome_select_file_policy.h" | 19 #include "chrome/browser/ui/chrome_select_file_policy.h" |
| 20 #include "chrome/grit/generated_resources.h" |
20 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
21 #include "content/public/browser/user_metrics.h" | 22 #include "content/public/browser/user_metrics.h" |
22 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
23 #include "content/public/browser/web_ui.h" | 24 #include "content/public/browser/web_ui.h" |
24 #include "content/public/browser/web_ui_data_source.h" | 25 #include "content/public/browser/web_ui_data_source.h" |
25 #include "extensions/browser/extension_system.h" | 26 #include "extensions/browser/extension_system.h" |
26 #include "extensions/browser/file_highlighter.h" | 27 #include "extensions/browser/file_highlighter.h" |
27 #include "extensions/common/constants.h" | 28 #include "extensions/common/constants.h" |
28 #include "extensions/common/extension.h" | 29 #include "extensions/common/extension.h" |
29 #include "extensions/common/manifest_constants.h" | 30 #include "extensions/common/manifest_constants.h" |
30 #include "grit/generated_resources.h" | |
31 #include "third_party/re2/re2/re2.h" | 31 #include "third_party/re2/re2/re2.h" |
32 #include "ui/base/l10n/l10n_util.h" | 32 #include "ui/base/l10n/l10n_util.h" |
33 #include "ui/shell_dialogs/select_file_dialog.h" | 33 #include "ui/shell_dialogs/select_file_dialog.h" |
34 | 34 |
35 namespace extensions { | 35 namespace extensions { |
36 | 36 |
37 namespace { | 37 namespace { |
38 | 38 |
39 // Read a file to a string and return. | 39 // Read a file to a string and return. |
40 std::string ReadFileToString(const base::FilePath& path) { | 40 std::string ReadFileToString(const base::FilePath& path) { |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 } | 314 } |
315 | 315 |
316 void ExtensionLoaderHandler::NotifyFrontendOfFailure() { | 316 void ExtensionLoaderHandler::NotifyFrontendOfFailure() { |
317 web_ui()->CallJavascriptFunction( | 317 web_ui()->CallJavascriptFunction( |
318 "extensions.ExtensionLoader.notifyLoadFailed", | 318 "extensions.ExtensionLoader.notifyLoadFailed", |
319 failures_); | 319 failures_); |
320 failures_.Clear(); | 320 failures_.Clear(); |
321 } | 321 } |
322 | 322 |
323 } // namespace extensions | 323 } // namespace extensions |
OLD | NEW |