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

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

Issue 7347011: Update URLPatternSet to contain a std::set instead of std::vector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows compile errors. Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 124
125 // TODO(aa): Handle more types of metadata. 125 // TODO(aa): Handle more types of metadata.
126 } 126 }
127 127
128 line_start = line_end + 1; 128 line_start = line_end + 1;
129 } 129 }
130 130
131 // If no patterns were specified, default to @include *. This is what 131 // If no patterns were specified, default to @include *. This is what
132 // Greasemonkey does. 132 // Greasemonkey does.
133 if (script->globs().empty() && script->url_patterns().empty()) 133 if (script->globs().empty() && script->url_patterns().is_empty())
134 script->add_glob("*"); 134 script->add_glob("*");
135 135
136 return true; 136 return true;
137 } 137 }
138 138
139 void UserScriptMaster::ScriptReloader::StartLoad( 139 void UserScriptMaster::ScriptReloader::StartLoad(
140 const UserScriptList& user_scripts) { 140 const UserScriptList& user_scripts) {
141 // Add a reference to ourselves to keep ourselves alive while we're running. 141 // Add a reference to ourselves to keep ourselves alive while we're running.
142 // Balanced by NotifyMaster(). 142 // Balanced by NotifyMaster().
143 AddRef(); 143 AddRef();
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 if (!handle) 373 if (!handle)
374 return; 374 return;
375 375
376 base::SharedMemoryHandle handle_for_process; 376 base::SharedMemoryHandle handle_for_process;
377 if (!shared_memory->ShareToProcess(handle, &handle_for_process)) 377 if (!shared_memory->ShareToProcess(handle, &handle_for_process))
378 return; // This can legitimately fail if the renderer asserts at startup. 378 return; // This can legitimately fail if the renderer asserts at startup.
379 379
380 if (base::SharedMemory::IsHandleValid(handle_for_process)) 380 if (base::SharedMemory::IsHandleValid(handle_for_process))
381 process->Send(new ExtensionMsg_UpdateUserScripts(handle_for_process)); 381 process->Send(new ExtensionMsg_UpdateUserScripts(handle_for_process));
382 } 382 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/browser/extensions/user_script_master_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698