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

Side by Side Diff: extensions/renderer/user_script_injector.h

Issue 495853002: Atomic UserScript ID generation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More UserScript IDs: int64 -> int 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_ 5 #ifndef EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_
6 #define EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_ 6 #define EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 UserScript::RunLocation run_location) OVERRIDE; 59 UserScript::RunLocation run_location) OVERRIDE;
60 virtual void OnWillNotInject(InjectFailureReason reason) OVERRIDE; 60 virtual void OnWillNotInject(InjectFailureReason reason) OVERRIDE;
61 61
62 // The associated user script. Owned by the UserScriptInjector that created 62 // The associated user script. Owned by the UserScriptInjector that created
63 // this object. 63 // this object.
64 const UserScript* script_; 64 const UserScript* script_;
65 65
66 // The id of the associated user script. We cache this because when we update 66 // The id of the associated user script. We cache this because when we update
67 // the |script_| associated with this injection, the old referance may be 67 // the |script_| associated with this injection, the old referance may be
68 // deleted. 68 // deleted.
69 int64 script_id_; 69 int script_id_;
70 70
71 // The associated extension id, preserved for the same reason as |script_id|. 71 // The associated extension id, preserved for the same reason as |script_id|.
72 std::string extension_id_; 72 std::string extension_id_;
73 73
74 ScopedObserver<UserScriptSet, UserScriptSet::Observer> 74 ScopedObserver<UserScriptSet, UserScriptSet::Observer>
75 user_script_set_observer_; 75 user_script_set_observer_;
76 76
77 DISALLOW_COPY_AND_ASSIGN(UserScriptInjector); 77 DISALLOW_COPY_AND_ASSIGN(UserScriptInjector);
78 }; 78 };
79 79
80 } // namespace extensions 80 } // namespace extensions
81 81
82 #endif // EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_ 82 #endif // EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_
OLDNEW
« extensions/common/user_script.cc ('K') | « extensions/common/user_script.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698