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

Side by Side Diff: tools/clang/rewrite_to_chrome_style/tests/methods-original.cc

Issue 1785563002: rewrite_to_chrome_style: Consistently decide if things are in blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rewrite-asserts: review Created 4 years, 9 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 | « tools/clang/rewrite_to_chrome_style/tests/methods-expected.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "gen/thing.h"
6
5 namespace v8 { 7 namespace v8 {
6 8
7 class InterfaceOutsideOfBlink { 9 class InterfaceOutsideOfBlink {
8 public: 10 public:
9 virtual void nonBlinkVirtual() = 0; 11 virtual void nonBlinkVirtual() = 0;
10 }; 12 };
11 13
12 } // namespace v8 14 } // namespace v8
13 15
14 namespace blink { 16 namespace blink {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 public: 92 public:
91 typedef T Testable::*UnspecifiedBoolType; 93 typedef T Testable::*UnspecifiedBoolType;
92 // This method has a reference to a member in a "member context" and a 94 // This method has a reference to a member in a "member context" and a
93 // "non-member context" to verify both are rewritten. 95 // "non-member context" to verify both are rewritten.
94 operator UnspecifiedBoolType() { return m_ptr ? &Testable::m_ptr : 0; } 96 operator UnspecifiedBoolType() { return m_ptr ? &Testable::m_ptr : 0; }
95 97
96 private: 98 private:
97 int m_ptr; 99 int m_ptr;
98 }; 100 };
99 101
102 namespace subname {
103
104 class SubnameParent {
105 virtual void subnameMethod() {}
106 };
107
108 } // namespace subname
109
110 class SubnameChild : public subname::SubnameParent {
111 // This subclasses from blink::subname::SubnameParent and should be renamed.
112 void subnameMethod() override {}
113 };
114
115 class GenChild : public blink::GenClass {
116 // This subclasses from the blink namespace but in the gen directory so it
117 // should not be renamed.
118 void genMethod() override {}
119 };
120
100 } // namespace blink 121 } // namespace blink
101 122
102 // Test that overrides from outside the Blink namespace are also updated. 123 // Test that overrides from outside the Blink namespace are also updated.
103 class BovineTask : public blink::Task { 124 class BovineTask : public blink::Task {
104 public: 125 public:
105 using Task::doTheWork; 126 using Task::doTheWork;
106 void reallyDoTheWork() override; 127 void reallyDoTheWork() override;
107 }; 128 };
108 129
109 class SuperBovineTask : public BovineTask { 130 class SuperBovineTask : public BovineTask {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 }; 186 };
166 187
167 } // namespace WTF 188 } // namespace WTF
168 189
169 void F2() { 190 void F2() {
170 blink::StructInBlink b; 191 blink::StructInBlink b;
171 b.function(); 192 b.function();
172 WTF::StructInWTF w; 193 WTF::StructInWTF w;
173 w.function(); 194 w.function();
174 } 195 }
OLDNEW
« no previous file with comments | « tools/clang/rewrite_to_chrome_style/tests/methods-expected.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698