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

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

Issue 115863: Move the Dictionary dir on the Mac out of the package and into user data.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 6 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 | « no previous file | no next file » | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 #if defined(OS_MACOSX) 86 #if defined(OS_MACOSX)
87 cur = cur.DirName(); 87 cur = cur.DirName();
88 cur = cur.Append(FILE_PATH_LITERAL("Resources")); 88 cur = cur.Append(FILE_PATH_LITERAL("Resources"));
89 cur = cur.Append(FILE_PATH_LITERAL("inspector")); 89 cur = cur.Append(FILE_PATH_LITERAL("inspector"));
90 #else 90 #else
91 cur = cur.Append(FILE_PATH_LITERAL("resources")); 91 cur = cur.Append(FILE_PATH_LITERAL("resources"));
92 cur = cur.Append(FILE_PATH_LITERAL("inspector")); 92 cur = cur.Append(FILE_PATH_LITERAL("inspector"));
93 #endif 93 #endif
94 break; 94 break;
95 case chrome::DIR_APP_DICTIONARIES: 95 case chrome::DIR_APP_DICTIONARIES:
96 #if defined(OS_LINUX) 96 #if defined(OS_LINUX) || defined(OS_MACOSX)
97 // We can't write into the EXE dir on Linux, so keep dictionaries 97 // We can't write into the EXE dir on Linux, so keep dictionaries
98 // alongside the safe browsing database in the user data dir. 98 // alongside the safe browsing database in the user data dir.
99 // And we don't want to write into the bundle on the Mac, so push
100 // it to the user data dir there also.
99 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 101 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
100 return false; 102 return false;
101 #else 103 #else
102 if (!PathService::Get(base::DIR_EXE, &cur)) 104 if (!PathService::Get(base::DIR_EXE, &cur))
103 return false; 105 return false;
104 #endif 106 #endif
105 cur = cur.Append(FILE_PATH_LITERAL("Dictionaries")); 107 cur = cur.Append(FILE_PATH_LITERAL("Dictionaries"));
106 create_dir = true; 108 create_dir = true;
107 break; 109 break;
108 case chrome::FILE_LOCAL_STATE: 110 case chrome::FILE_LOCAL_STATE:
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 return true; 193 return true;
192 } 194 }
193 195
194 // This cannot be done as a static initializer sadly since Visual Studio will 196 // This cannot be done as a static initializer sadly since Visual Studio will
195 // eliminate this object file if there is no direct entry point into it. 197 // eliminate this object file if there is no direct entry point into it.
196 void RegisterPathProvider() { 198 void RegisterPathProvider() {
197 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 199 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
198 } 200 }
199 201
200 } // namespace chrome 202 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698