Как делается Яндекс.Браузер — Михаил Лопаткин
-
Upload
yandex -
Category
Technology
-
view
2.055 -
download
5
description
Transcript of Как делается Яндекс.Браузер — Михаил Лопаткин
▌
▌
✓✓
✓
│
││
▌
▌
│
│││││
││
#ifndef UPSTREAM_HEADER_H_ #define UPSTREAM_HEADER_H _ … class SomeClass{ … Some upstream implementation } #endif
#ifndef UPSTREAM_HEADER_H_ #define UPSTREAM_HEADER_H _ #include “yandex/new_header.h” #if 0 … class SomeClass{ … Some upstream implementation } #endif #endif
#ifndef YANDEX_NEW_HEADER_H_ #define YANDEX_NEW_HEADER_H _ … class SomeClass{ … Some implementation from Yandex } #endif
│
class Foo { void doSomething() { // doing stuff // ... // still doing // lots of upstream code } }
class StuffDoer { void doStuff() { // doing stuff // ... // still doing } }
class Foo { StuffDoer mDoer; void doSomething() { mDoer.doStuff(); // lots of upstream code } }
class SomeManager { void methodOne() { … } void methodTwo() { … } }
interface IManager { void methodOne(); void methodTwo(); }
class SomeManager implements IManager { void methodOne() { … } void methodTwo() { … } }
class YandexManager implements IManager { void methodOne() { … } void methodTwo() { … } }
class SomeManager { void originalMethod(Foo foo) { … } }
class SomeManager { void originalMethod(Foo foo, Bar bar) { // original stuff // stuff with Bar } }
class SomeManager { void originalMethod(Foo foo, Bar bar) { // original stuff // stuff with Bar } void originalMethod(Foo foo) { originalMethod(foo, SOME_DEFAULT_BAR); } }
class Base { void originalMethod(Foo foo) { … } } class YandexDerived extends Base { void originalMethod(Foo foo, Bar bar) { … } }
class Base { void originalMethod(Foo foo, Bar bar) { … } } class YandexDerived extends Base { void originalMethod(Foo foo, Bar bar) { … } }
class Base { void originalMethodForked(Foo foo, Bar bar) { originalMethod(foo) } void originalMethod(Foo foo) { … } } class YandexDerived extends Base { void originalMethodForked(Foo foo, Bar bar)
▌
▌
if (i > 0) { if (i != 0) { … } }
▌
▌