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

Side by Side Diff: third_party/android_crazy_linker/src/src/crazy_linker_wrappers.cpp

Issue 1100763002: Inject CanAddURLToHistory into TopSitesImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs
Patch Set: Fix error introduced during rebase Created 5 years, 7 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 #include "crazy_linker_wrappers.h" 5 #include "crazy_linker_wrappers.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <link.h> 8 #include <link.h>
9 9
10 #include "crazy_linker_debug.h" 10 #include "crazy_linker_debug.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // library, so don't try to handle it with the crazy linker. 75 // library, so don't try to handle it with the crazy linker.
76 if (path) { 76 if (path) {
77 LibraryList* lib_list = Globals::GetLibraries(); 77 LibraryList* lib_list = Globals::GetLibraries();
78 Error error; 78 Error error;
79 LibraryView* wrap = lib_list->LoadLibrary(path, 79 LibraryView* wrap = lib_list->LoadLibrary(path,
80 mode, 80 mode,
81 0U /* load_address */, 81 0U /* load_address */,
82 0U /* file_offset */, 82 0U /* file_offset */,
83 Globals::GetSearchPaths(), 83 Globals::GetSearchPaths(),
84 false, 84 false,
85 false,
85 &error); 86 &error);
86 if (wrap) 87 if (wrap)
87 return wrap; 88 return wrap;
88 } 89 }
89 90
90 // Try to load the executable with the system dlopen() instead. 91 // Try to load the executable with the system dlopen() instead.
91 ::dlerror(); 92 ::dlerror();
92 void* system_lib = ::dlopen(path, mode); 93 void* system_lib = ::dlopen(path, mode);
93 if (system_lib == NULL) { 94 if (system_lib == NULL) {
94 SaveSystemError(); 95 SaveSystemError();
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 }; 270 };
270 static const size_t kCount = sizeof(kSymbols) / sizeof(kSymbols[0]); 271 static const size_t kCount = sizeof(kSymbols) / sizeof(kSymbols[0]);
271 for (size_t n = 0; n < kCount; ++n) { 272 for (size_t n = 0; n < kCount; ++n) {
272 if (!strcmp(kSymbols[n].name, name)) 273 if (!strcmp(kSymbols[n].name, name))
273 return kSymbols[n].address; 274 return kSymbols[n].address;
274 } 275 }
275 return NULL; 276 return NULL;
276 } 277 }
277 278
278 } // namespace crazy 279 } // namespace crazy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698