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

Side by Side Diff: chrome/common/chrome_paths.cc

Issue 6537022: Move media library path resolution into Chrome path provider. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/common/chrome_paths.h" 5 #include "chrome/common/chrome_paths.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 break; 180 break;
181 case chrome::DIR_USER_DATA_TEMP: 181 case chrome::DIR_USER_DATA_TEMP:
182 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 182 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
183 return false; 183 return false;
184 cur = cur.Append(FILE_PATH_LITERAL("Temp")); 184 cur = cur.Append(FILE_PATH_LITERAL("Temp"));
185 break; 185 break;
186 case chrome::DIR_INTERNAL_PLUGINS: 186 case chrome::DIR_INTERNAL_PLUGINS:
187 if (!GetInternalPluginsDirectory(&cur)) 187 if (!GetInternalPluginsDirectory(&cur))
188 return false; 188 return false;
189 break; 189 break;
190 case chrome::DIR_MEDIA_LIBS:
191 #if defined(OS_MACOSX)
192 *result = base::mac::MainAppBundlePath();
193 *result = result->Append("Libraries");
194 #else
195 return PathService::Get(chrome::DIR_APP, result);
196 #endif
190 case chrome::FILE_LOCAL_STATE: 197 case chrome::FILE_LOCAL_STATE:
191 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 198 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
192 return false; 199 return false;
193 cur = cur.Append(chrome::kLocalStateFilename); 200 cur = cur.Append(chrome::kLocalStateFilename);
194 break; 201 break;
195 case chrome::FILE_RECORDED_SCRIPT: 202 case chrome::FILE_RECORDED_SCRIPT:
196 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 203 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
197 return false; 204 return false;
198 cur = cur.Append(FILE_PATH_LITERAL("script.log")); 205 cur = cur.Append(FILE_PATH_LITERAL("script.log"));
199 break; 206 break;
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 return true; 347 return true;
341 } 348 }
342 349
343 // This cannot be done as a static initializer sadly since Visual Studio will 350 // This cannot be done as a static initializer sadly since Visual Studio will
344 // eliminate this object file if there is no direct entry point into it. 351 // eliminate this object file if there is no direct entry point into it.
345 void RegisterPathProvider() { 352 void RegisterPathProvider() {
346 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 353 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
347 } 354 }
348 355
349 } // namespace chrome 356 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698