| OLD | NEW |
| 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| 11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
| 12 #include "base/pickle.h" | 12 #include "base/pickle.h" |
| 13 #include "base/stl_util-inl.h" |
| 13 #include "base/string_util.h" | 14 #include "base/string_util.h" |
| 14 #include "chrome/common/notification_service.h" | 15 #include "chrome/common/notification_service.h" |
| 15 #include "chrome/common/stl_util-inl.h" | |
| 16 #include "chrome/common/url_constants.h" | 16 #include "chrome/common/url_constants.h" |
| 17 #include "net/base/net_util.h" | 17 #include "net/base/net_util.h" |
| 18 | 18 |
| 19 | 19 |
| 20 // Helper function to parse greasesmonkey headers | 20 // Helper function to parse greasesmonkey headers |
| 21 static bool GetDeclarationValue(const StringPiece& line, | 21 static bool GetDeclarationValue(const StringPiece& line, |
| 22 const StringPiece& prefix, | 22 const StringPiece& prefix, |
| 23 std::string* value) { | 23 std::string* value) { |
| 24 if (!line.starts_with(prefix)) | 24 if (!line.starts_with(prefix)) |
| 25 return false; | 25 return false; |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 | 308 |
| 309 StartScan(); | 309 StartScan(); |
| 310 } | 310 } |
| 311 | 311 |
| 312 void UserScriptMaster::StartScan() { | 312 void UserScriptMaster::StartScan() { |
| 313 if (!script_reloader_) | 313 if (!script_reloader_) |
| 314 script_reloader_ = new ScriptReloader(this); | 314 script_reloader_ = new ScriptReloader(this); |
| 315 | 315 |
| 316 script_reloader_->StartScan(worker_loop_, user_script_dir_, lone_scripts_); | 316 script_reloader_->StartScan(worker_loop_, user_script_dir_, lone_scripts_); |
| 317 } | 317 } |
| OLD | NEW |