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

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

Issue 172039: Replaces some TrimWhitespace with TrimWhitespaceASCII or TrimWhitespaceUTF8. (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 11 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 | « chrome/browser/extensions/extension_file_util.cc ('k') | chrome/browser/net/url_fixer_upper.cc » ('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) 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 <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 13 matching lines...) Expand all
24 24
25 // Helper function to parse greasesmonkey headers 25 // Helper function to parse greasesmonkey headers
26 static bool GetDeclarationValue(const StringPiece& line, 26 static bool GetDeclarationValue(const StringPiece& line,
27 const StringPiece& prefix, 27 const StringPiece& prefix,
28 std::string* value) { 28 std::string* value) {
29 if (!line.starts_with(prefix)) 29 if (!line.starts_with(prefix))
30 return false; 30 return false;
31 31
32 std::string temp(line.data() + prefix.length(), 32 std::string temp(line.data() + prefix.length(),
33 line.length() - prefix.length()); 33 line.length() - prefix.length());
34 TrimWhitespace(temp, TRIM_ALL, value); 34 TrimWhitespaceASCII(temp, TRIM_ALL, value);
35 return true; 35 return true;
36 } 36 }
37 37
38 UserScriptMaster::ScriptReloader::ScriptReloader(UserScriptMaster* master) 38 UserScriptMaster::ScriptReloader::ScriptReloader(UserScriptMaster* master)
39 : master_(master), 39 : master_(master),
40 master_message_loop_(MessageLoop::current()) { 40 master_message_loop_(MessageLoop::current()) {
41 } 41 }
42 42
43 // static 43 // static
44 bool UserScriptMaster::ScriptReloader::ParseMetadataHeader( 44 bool UserScriptMaster::ScriptReloader::ParseMetadataHeader(
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 DCHECK(false); 380 DCHECK(false);
381 } 381 }
382 } 382 }
383 383
384 void UserScriptMaster::StartScan() { 384 void UserScriptMaster::StartScan() {
385 if (!script_reloader_) 385 if (!script_reloader_)
386 script_reloader_ = new ScriptReloader(this); 386 script_reloader_ = new ScriptReloader(this);
387 387
388 script_reloader_->StartScan(worker_loop_, user_script_dir_, lone_scripts_); 388 script_reloader_->StartScan(worker_loop_, user_script_dir_, lone_scripts_);
389 } 389 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_file_util.cc ('k') | chrome/browser/net/url_fixer_upper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698