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

Side by Side Diff: content/shell/app/shell_main_delegate.cc

Issue 451283002: Drop the bool parameter from InitSharedInstanceWithPakFileRegion(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: REBASE 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 | Annotate | Revision Log
« no previous file with comments | « chrome/app/chrome_main_delegate.cc ('k') | ui/base/resource/resource_bundle.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/shell/app/shell_main_delegate.h" 5 #include "content/shell/app/shell_main_delegate.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/cpu.h" 9 #include "base/cpu.h"
10 #include "base/files/file.h" 10 #include "base/files/file.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 void ShellMainDelegate::InitializeResourceBundle() { 261 void ShellMainDelegate::InitializeResourceBundle() {
262 #if defined(OS_ANDROID) 262 #if defined(OS_ANDROID)
263 // In the Android case, the renderer runs with a different UID and can never 263 // In the Android case, the renderer runs with a different UID and can never
264 // access the file system. So we are passed a file descriptor to the 264 // access the file system. So we are passed a file descriptor to the
265 // ResourceBundle pak at launch time. 265 // ResourceBundle pak at launch time.
266 int pak_fd = 266 int pak_fd =
267 base::GlobalDescriptors::GetInstance()->MaybeGet(kShellPakDescriptor); 267 base::GlobalDescriptors::GetInstance()->MaybeGet(kShellPakDescriptor);
268 if (pak_fd >= 0) { 268 if (pak_fd >= 0) {
269 // This is clearly wrong. See crbug.com/330930 269 // This is clearly wrong. See crbug.com/330930
270 ui::ResourceBundle::InitSharedInstanceWithPakFileRegion( 270 ui::ResourceBundle::InitSharedInstanceWithPakFileRegion(
271 base::File(pak_fd), base::MemoryMappedFile::Region::kWholeFile, false); 271 base::File(pak_fd), base::MemoryMappedFile::Region::kWholeFile);
272 ResourceBundle::GetSharedInstance().AddDataPackFromFile( 272 ResourceBundle::GetSharedInstance().AddDataPackFromFile(
273 base::File(pak_fd), ui::SCALE_FACTOR_100P); 273 base::File(pak_fd), ui::SCALE_FACTOR_100P);
274 return; 274 return;
275 } 275 }
276 #endif 276 #endif
277 277
278 base::FilePath pak_file; 278 base::FilePath pak_file;
279 #if defined(OS_MACOSX) 279 #if defined(OS_MACOSX)
280 pak_file = GetResourcesPakFilePath(); 280 pak_file = GetResourcesPakFilePath();
281 #else 281 #else
(...skipping 16 matching lines...) Expand all
298 browser_client_.reset(new ShellContentBrowserClient); 298 browser_client_.reset(new ShellContentBrowserClient);
299 return browser_client_.get(); 299 return browser_client_.get();
300 } 300 }
301 301
302 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { 302 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() {
303 renderer_client_.reset(new ShellContentRendererClient); 303 renderer_client_.reset(new ShellContentRendererClient);
304 return renderer_client_.get(); 304 return renderer_client_.get();
305 } 305 }
306 306
307 } // namespace content 307 } // namespace content
OLDNEW
« no previous file with comments | « chrome/app/chrome_main_delegate.cc ('k') | ui/base/resource/resource_bundle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698