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/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/grit/generated_resources.h" | 18 #include "chrome/grit/generated_resources.h" |
19 #include "content/public/browser/browser_thread.h" | 19 #include "content/public/browser/browser_thread.h" |
20 #include "content/public/browser/web_contents.h" | 20 #include "content/public/browser/web_contents.h" |
21 #include "content/public/browser/web_ui.h" | 21 #include "content/public/browser/web_ui.h" |
22 #include "content/public/browser/web_ui_data_source.h" | 22 #include "content/public/browser/web_ui_data_source.h" |
23 #include "extensions/browser/extension_system.h" | 23 #include "extensions/browser/extension_system.h" |
24 #include "extensions/browser/file_highlighter.h" | 24 #include "extensions/browser/file_highlighter.h" |
25 #include "extensions/common/constants.h" | 25 #include "extensions/common/constants.h" |
26 #include "extensions/common/extension.h" | 26 #include "extensions/common/extension.h" |
27 #include "extensions/common/manifest_constants.h" | 27 #include "extensions/common/manifest_constants.h" |
28 #include "third_party/re2/re2/re2.h" | 28 #include "third_party/re2/src/re2/re2.h" |
29 #include "ui/base/l10n/l10n_util.h" | 29 #include "ui/base/l10n/l10n_util.h" |
30 | 30 |
31 namespace extensions { | 31 namespace extensions { |
32 | 32 |
33 namespace { | 33 namespace { |
34 | 34 |
35 // Read a file to a string and return. | 35 // Read a file to a string and return. |
36 std::string ReadFileToString(const base::FilePath& path) { | 36 std::string ReadFileToString(const base::FilePath& path) { |
37 std::string data; | 37 std::string data; |
38 // This call can fail, but it doesn't matter for our purposes. If it fails, | 38 // This call can fail, but it doesn't matter for our purposes. If it fails, |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 } | 205 } |
206 | 206 |
207 void ExtensionLoaderHandler::NotifyFrontendOfFailure() { | 207 void ExtensionLoaderHandler::NotifyFrontendOfFailure() { |
208 web_ui()->CallJavascriptFunction( | 208 web_ui()->CallJavascriptFunction( |
209 "extensions.ExtensionLoader.notifyLoadFailed", | 209 "extensions.ExtensionLoader.notifyLoadFailed", |
210 failures_); | 210 failures_); |
211 failures_.Clear(); | 211 failures_.Clear(); |
212 } | 212 } |
213 | 213 |
214 } // namespace extensions | 214 } // namespace extensions |
OLD | NEW |