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

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

Issue 12208057: Add explicit base to FilePath. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | « content/shell/shell_download_manager_delegate.cc ('k') | content/shell/shell_message_filter.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/shell_main_delegate.h" 5 #include "content/shell/shell_main_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // "default_level"=dword:00000004 58 // "default_level"=dword:00000004
59 // @="Content Shell" 59 // @="Content Shell"
60 60
61 // {6A3E50A4-7E15-4099-8413-EC94D8C2A4B6} 61 // {6A3E50A4-7E15-4099-8413-EC94D8C2A4B6}
62 const GUID kContentShellProviderName = { 62 const GUID kContentShellProviderName = {
63 0x6a3e50a4, 0x7e15, 0x4099, 63 0x6a3e50a4, 0x7e15, 0x4099,
64 { 0x84, 0x13, 0xec, 0x94, 0xd8, 0xc2, 0xa4, 0xb6 } }; 64 { 0x84, 0x13, 0xec, 0x94, 0xd8, 0xc2, 0xa4, 0xb6 } };
65 #endif 65 #endif
66 66
67 void InitLogging() { 67 void InitLogging() {
68 FilePath log_filename; 68 base::FilePath log_filename;
69 PathService::Get(base::DIR_EXE, &log_filename); 69 PathService::Get(base::DIR_EXE, &log_filename);
70 log_filename = log_filename.AppendASCII("content_shell.log"); 70 log_filename = log_filename.AppendASCII("content_shell.log");
71 logging::InitLogging( 71 logging::InitLogging(
72 log_filename.value().c_str(), 72 log_filename.value().c_str(),
73 logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, 73 logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG,
74 logging::LOCK_LOG_FILE, 74 logging::LOCK_LOG_FILE,
75 logging::DELETE_OLD_LOG_FILE, 75 logging::DELETE_OLD_LOG_FILE,
76 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); 76 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
77 logging::SetLogItems(true, true, true, true); 77 logging::SetLogItems(true, true, true, true);
78 } 78 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 int pak_fd = 151 int pak_fd =
152 base::GlobalDescriptors::GetInstance()->MaybeGet(kShellPakDescriptor); 152 base::GlobalDescriptors::GetInstance()->MaybeGet(kShellPakDescriptor);
153 if (pak_fd != base::kInvalidPlatformFileValue) { 153 if (pak_fd != base::kInvalidPlatformFileValue) {
154 ui::ResourceBundle::InitSharedInstanceWithPakFile(pak_fd, false); 154 ui::ResourceBundle::InitSharedInstanceWithPakFile(pak_fd, false);
155 ResourceBundle::GetSharedInstance().AddDataPackFromFile( 155 ResourceBundle::GetSharedInstance().AddDataPackFromFile(
156 pak_fd, ui::SCALE_FACTOR_100P); 156 pak_fd, ui::SCALE_FACTOR_100P);
157 return; 157 return;
158 } 158 }
159 #endif 159 #endif
160 160
161 FilePath pak_file; 161 base::FilePath pak_file;
162 #if defined(OS_MACOSX) 162 #if defined(OS_MACOSX)
163 pak_file = GetResourcesPakFilePath(); 163 pak_file = GetResourcesPakFilePath();
164 #else 164 #else
165 FilePath pak_dir; 165 base::FilePath pak_dir;
166 166
167 #if defined(OS_ANDROID) 167 #if defined(OS_ANDROID)
168 bool got_path = PathService::Get(base::DIR_ANDROID_APP_DATA, &pak_dir); 168 bool got_path = PathService::Get(base::DIR_ANDROID_APP_DATA, &pak_dir);
169 DCHECK(got_path); 169 DCHECK(got_path);
170 pak_dir = pak_dir.Append(FILE_PATH_LITERAL("paks")); 170 pak_dir = pak_dir.Append(FILE_PATH_LITERAL("paks"));
171 #else 171 #else
172 PathService::Get(base::DIR_MODULE, &pak_dir); 172 PathService::Get(base::DIR_MODULE, &pak_dir);
173 #endif 173 #endif
174 174
175 pak_file = pak_dir.Append(FILE_PATH_LITERAL("content_shell.pak")); 175 pak_file = pak_dir.Append(FILE_PATH_LITERAL("content_shell.pak"));
176 #endif 176 #endif
177 ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file); 177 ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file);
178 } 178 }
179 179
180 ContentBrowserClient* ShellMainDelegate::CreateContentBrowserClient() { 180 ContentBrowserClient* ShellMainDelegate::CreateContentBrowserClient() {
181 browser_client_.reset(new ShellContentBrowserClient); 181 browser_client_.reset(new ShellContentBrowserClient);
182 return browser_client_.get(); 182 return browser_client_.get();
183 } 183 }
184 184
185 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { 185 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() {
186 renderer_client_.reset(new ShellContentRendererClient); 186 renderer_client_.reset(new ShellContentRendererClient);
187 return renderer_client_.get(); 187 return renderer_client_.get();
188 } 188 }
189 189
190 } // namespace content 190 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/shell_download_manager_delegate.cc ('k') | content/shell/shell_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698