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

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

Issue 404613006: Declarative content scripts: Renderer-side: per-extension shared memory regions (lazily loaded) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes for last round of comments Created 6 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
« no previous file with comments | « no previous file | extensions/common/extension_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 // calling InitUserScripts when it's created which will call this again. 537 // calling InitUserScripts when it's created which will call this again.
538 base::ProcessHandle handle = process->GetHandle(); 538 base::ProcessHandle handle = process->GetHandle();
539 if (!handle) 539 if (!handle)
540 return; 540 return;
541 541
542 base::SharedMemoryHandle handle_for_process; 542 base::SharedMemoryHandle handle_for_process;
543 if (!shared_memory->ShareToProcess(handle, &handle_for_process)) 543 if (!shared_memory->ShareToProcess(handle, &handle_for_process))
544 return; // This can legitimately fail if the renderer asserts at startup. 544 return; // This can legitimately fail if the renderer asserts at startup.
545 545
546 if (base::SharedMemory::IsHandleValid(handle_for_process)) { 546 if (base::SharedMemory::IsHandleValid(handle_for_process)) {
547 process->Send(new ExtensionMsg_UpdateUserScripts(handle_for_process, 547 process->Send(new ExtensionMsg_UpdateUserScripts(
548 changed_extensions)); 548 handle_for_process, "" /* owner */, changed_extensions));
549 } 549 }
550 } 550 }
551 551
552 } // namespace extensions 552 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | extensions/common/extension_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698