OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/user_script_master.h" | 5 #include "chrome/browser/extensions/user_script_master.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/pickle.h" | 14 #include "base/pickle.h" |
15 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
16 #include "base/string_util.h" | 16 #include "base/string_util.h" |
17 #include "base/threading/thread.h" | 17 #include "base/threading/thread.h" |
18 #include "base/version.h" | 18 #include "base/version.h" |
19 #include "chrome/browser/extensions/extension_service.h" | 19 #include "chrome/browser/extensions/extension_service.h" |
20 #include "chrome/browser/extensions/extension_system.h" | 20 #include "chrome/browser/extensions/extension_system.h" |
21 #include "chrome/browser/profiles/profile.h" | 21 #include "chrome/browser/profiles/profile.h" |
22 #include "chrome/common/chrome_notification_types.h" | 22 #include "chrome/common/chrome_notification_types.h" |
23 #include "chrome/common/extensions/api/i18n/default_locale_handler.h" | 23 #include "chrome/common/extensions/api/i18n/default_locale_handler.h" |
24 #include "chrome/common/extensions/extension.h" | 24 #include "chrome/common/extensions/extension.h" |
25 #include "chrome/common/extensions/extension_file_util.h" | 25 #include "chrome/common/extensions/extension_file_util.h" |
26 #include "chrome/common/extensions/extension_resource.h" | |
27 #include "chrome/common/extensions/extension_set.h" | 26 #include "chrome/common/extensions/extension_set.h" |
28 #include "chrome/common/extensions/message_bundle.h" | 27 #include "chrome/common/extensions/message_bundle.h" |
29 #include "content/public/browser/notification_service.h" | 28 #include "content/public/browser/notification_service.h" |
30 #include "content/public/browser/render_process_host.h" | 29 #include "content/public/browser/render_process_host.h" |
| 30 #include "extensions/common/extension_resource.h" |
31 | 31 |
32 using content::BrowserThread; | 32 using content::BrowserThread; |
33 | 33 |
34 namespace extensions { | 34 namespace extensions { |
35 | 35 |
36 // Helper function to parse greasesmonkey headers | 36 // Helper function to parse greasesmonkey headers |
37 static bool GetDeclarationValue(const base::StringPiece& line, | 37 static bool GetDeclarationValue(const base::StringPiece& line, |
38 const base::StringPiece& prefix, | 38 const base::StringPiece& prefix, |
39 std::string* value) { | 39 std::string* value) { |
40 base::StringPiece::size_type index = line.find(prefix); | 40 base::StringPiece::size_type index = line.find(prefix); |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 | 434 |
435 base::SharedMemoryHandle handle_for_process; | 435 base::SharedMemoryHandle handle_for_process; |
436 if (!shared_memory->ShareToProcess(handle, &handle_for_process)) | 436 if (!shared_memory->ShareToProcess(handle, &handle_for_process)) |
437 return; // This can legitimately fail if the renderer asserts at startup. | 437 return; // This can legitimately fail if the renderer asserts at startup. |
438 | 438 |
439 if (base::SharedMemory::IsHandleValid(handle_for_process)) | 439 if (base::SharedMemory::IsHandleValid(handle_for_process)) |
440 process->Send(new ExtensionMsg_UpdateUserScripts(handle_for_process)); | 440 process->Send(new ExtensionMsg_UpdateUserScripts(handle_for_process)); |
441 } | 441 } |
442 | 442 |
443 } // namespace extensions | 443 } // namespace extensions |
OLD | NEW |