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

Side by Side Diff: tools/gn/loader.h

Issue 1370603002: Make some global pointers const void* const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 2 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 | « content/browser/android/content_view_core_impl.cc ('k') | tools/gn/loader.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 TOOLS_GN_LOADER_H_ 5 #ifndef TOOLS_GN_LOADER_H_
6 #define TOOLS_GN_LOADER_H_ 6 #define TOOLS_GN_LOADER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // label, and calls Load(). 56 // label, and calls Load().
57 void Load(const Label& label, const LocationRange& origin); 57 void Load(const Label& label, const LocationRange& origin);
58 58
59 // Returns the build file that the given label references. 59 // Returns the build file that the given label references.
60 static SourceFile BuildFileForLabel(const Label& label); 60 static SourceFile BuildFileForLabel(const Label& label);
61 61
62 // When processing the default build config, we want to capture the argument 62 // When processing the default build config, we want to capture the argument
63 // of set_default_build_config. The implementation of that function uses this 63 // of set_default_build_config. The implementation of that function uses this
64 // constant as a property key to get the Label* out of the scope where the 64 // constant as a property key to get the Label* out of the scope where the
65 // label should be stored. 65 // label should be stored.
66 static const void* kDefaultToolchainKey; 66 static const void* const kDefaultToolchainKey;
67 67
68 protected: 68 protected:
69 friend class base::RefCountedThreadSafe<Loader>; 69 friend class base::RefCountedThreadSafe<Loader>;
70 virtual ~Loader(); 70 virtual ~Loader();
71 }; 71 };
72 72
73 class LoaderImpl : public Loader { 73 class LoaderImpl : public Loader {
74 public: 74 public:
75 // Callback to emulate InputFileManager::AsyncLoadFile. 75 // Callback to emulate InputFileManager::AsyncLoadFile.
76 typedef base::Callback<bool(const LocationRange&, 76 typedef base::Callback<bool(const LocationRange&,
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 const BuildSettings* build_settings_; 172 const BuildSettings* build_settings_;
173 Label default_toolchain_label_; 173 Label default_toolchain_label_;
174 174
175 // Records for the build config file loads. 175 // Records for the build config file loads.
176 // Owning pointers. 176 // Owning pointers.
177 typedef std::map<Label, ToolchainRecord*> ToolchainRecordMap; 177 typedef std::map<Label, ToolchainRecord*> ToolchainRecordMap;
178 ToolchainRecordMap toolchain_records_; 178 ToolchainRecordMap toolchain_records_;
179 }; 179 };
180 180
181 #endif // TOOLS_GN_LOADER_H_ 181 #endif // TOOLS_GN_LOADER_H_
OLDNEW
« no previous file with comments | « content/browser/android/content_view_core_impl.cc ('k') | tools/gn/loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698