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

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

Issue 6370009: Add in-profile external_extensions.json file for Chrome OS OEM customization. (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: Ready for review. Created 9 years, 11 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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 cur = cur.Append(FILE_PATH_LITERAL("Managed Preferences")); 313 cur = cur.Append(FILE_PATH_LITERAL("Managed Preferences"));
314 char* login = getlogin(); 314 char* login = getlogin();
315 if (!login) 315 if (!login)
316 return false; 316 return false;
317 cur = cur.AppendASCII(login); 317 cur = cur.AppendASCII(login);
318 if (!file_util::PathExists(cur)) // we don't want to create this 318 if (!file_util::PathExists(cur)) // we don't want to create this
319 return false; 319 return false;
320 break; 320 break;
321 } 321 }
322 #endif 322 #endif
323 #if defined(OS_CHROMEOS)
324 case chrome::DIR_USER_EXTERNAL_EXTENSIONS: {
325 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
Erik does not do reviews 2011/01/21 17:05:25 I haven't been following your conversations with D
Dmitry Polukhin 2011/01/21 17:46:19 It can't be some shared location because it needs
326 return false;
327 cur = cur.Append(FILE_PATH_LITERAL("External Extensions"));
328 break;
329 }
330 #endif
323 default: 331 default:
324 return false; 332 return false;
325 } 333 }
326 334
327 if (create_dir && !file_util::PathExists(cur) && 335 if (create_dir && !file_util::PathExists(cur) &&
328 !file_util::CreateDirectory(cur)) 336 !file_util::CreateDirectory(cur))
329 return false; 337 return false;
330 338
331 *result = cur; 339 *result = cur;
332 return true; 340 return true;
333 } 341 }
334 342
335 // This cannot be done as a static initializer sadly since Visual Studio will 343 // This cannot be done as a static initializer sadly since Visual Studio will
336 // eliminate this object file if there is no direct entry point into it. 344 // eliminate this object file if there is no direct entry point into it.
337 void RegisterPathProvider() { 345 void RegisterPathProvider() {
338 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 346 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
339 } 347 }
340 348
341 } // namespace chrome 349 } // namespace chrome
OLDNEW
« chrome/browser/extensions/external_pref_extension_loader.cc ('K') | « chrome/common/chrome_paths.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698