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

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

Issue 173853007: Media Galleries: Prune uninteresting folders when scanning. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 6 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 | « chrome/common/chrome_paths.h ('k') | chrome/common/chrome_paths_internal.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 "chrome/common/chrome_paths.h" 5 #include "chrome/common/chrome_paths.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 return false; 452 return false;
453 cur = cur.Append(FILE_PATH_LITERAL("Managed Preferences")); 453 cur = cur.Append(FILE_PATH_LITERAL("Managed Preferences"));
454 char* login = getlogin(); 454 char* login = getlogin();
455 if (!login) 455 if (!login)
456 return false; 456 return false;
457 cur = cur.AppendASCII(login); 457 cur = cur.AppendASCII(login);
458 if (!base::PathExists(cur)) // We don't want to create this. 458 if (!base::PathExists(cur)) // We don't want to create this.
459 return false; 459 return false;
460 break; 460 break;
461 } 461 }
462 case chrome::DIR_USER_LIBRARY: {
463 if (!GetUserLibraryDirectory(&cur))
464 return false;
465 if (!base::PathExists(cur)) // We don't want to create this.
466 return false;
467 break;
468 }
469 case chrome::DIR_USER_APPLICATIONS: {
470 if (!GetUserApplicationsDirectory(&cur))
471 return false;
472 if (!base::PathExists(cur)) // We don't want to create this.
473 return false;
474 break;
475 }
462 #endif 476 #endif
463 #if defined(OS_CHROMEOS) || (defined(OS_MACOSX) && !defined(OS_IOS)) 477 #if defined(OS_CHROMEOS) || (defined(OS_MACOSX) && !defined(OS_IOS))
464 case chrome::DIR_USER_EXTERNAL_EXTENSIONS: { 478 case chrome::DIR_USER_EXTERNAL_EXTENSIONS: {
465 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 479 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
466 return false; 480 return false;
467 cur = cur.Append(FILE_PATH_LITERAL("External Extensions")); 481 cur = cur.Append(FILE_PATH_LITERAL("External Extensions"));
468 break; 482 break;
469 } 483 }
470 #endif 484 #endif
471 #if defined(OS_LINUX) 485 #if defined(OS_LINUX)
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 return true; 559 return true;
546 } 560 }
547 561
548 // This cannot be done as a static initializer sadly since Visual Studio will 562 // This cannot be done as a static initializer sadly since Visual Studio will
549 // eliminate this object file if there is no direct entry point into it. 563 // eliminate this object file if there is no direct entry point into it.
550 void RegisterPathProvider() { 564 void RegisterPathProvider() {
551 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 565 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
552 } 566 }
553 567
554 } // namespace chrome 568 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | chrome/common/chrome_paths_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698