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

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

Issue 301973009: Add browser-global GCMDriver (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build on Android. Created 6 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 | « chrome/common/chrome_paths.h ('k') | chrome/test/base/testing_browser_process.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/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/bundle_locations.h" 10 #include "base/mac/bundle_locations.h"
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 #endif 570 #endif
571 #endif // !defined(OS_MACOSX) 571 #endif // !defined(OS_MACOSX)
572 break; 572 break;
573 573
574 case chrome::DIR_USER_NATIVE_MESSAGING: 574 case chrome::DIR_USER_NATIVE_MESSAGING:
575 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 575 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
576 return false; 576 return false;
577 cur = cur.Append(FILE_PATH_LITERAL("NativeMessagingHosts")); 577 cur = cur.Append(FILE_PATH_LITERAL("NativeMessagingHosts"));
578 break; 578 break;
579 #endif // defined(OS_LINUX) || (defined(OS_MACOSX) && !defined(OS_IOS)) 579 #endif // defined(OS_LINUX) || (defined(OS_MACOSX) && !defined(OS_IOS))
580 #if !defined(OS_ANDROID)
581 case chrome::DIR_GLOBAL_GCM_STORE:
582 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
583 return false;
584 cur = cur.Append(kGCMStoreDirname);
585 break;
586 #endif // !defined(OS_ANDROID)
580 587
581 default: 588 default:
582 return false; 589 return false;
583 } 590 }
584 591
585 // TODO(bauerb): http://crbug.com/259796 592 // TODO(bauerb): http://crbug.com/259796
586 base::ThreadRestrictions::ScopedAllowIO allow_io; 593 base::ThreadRestrictions::ScopedAllowIO allow_io;
587 if (create_dir && !base::PathExists(cur) && 594 if (create_dir && !base::PathExists(cur) &&
588 !base::CreateDirectory(cur)) 595 !base::CreateDirectory(cur))
589 return false; 596 return false;
(...skipping 10 matching lines...) Expand all
600 607
601 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { 608 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) {
602 g_invalid_specified_user_data_dir.Get() = user_data_dir; 609 g_invalid_specified_user_data_dir.Get() = user_data_dir;
603 } 610 }
604 611
605 const base::FilePath& GetInvalidSpecifiedUserDataDir() { 612 const base::FilePath& GetInvalidSpecifiedUserDataDir() {
606 return g_invalid_specified_user_data_dir.Get(); 613 return g_invalid_specified_user_data_dir.Get();
607 } 614 }
608 615
609 } // namespace chrome 616 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | chrome/test/base/testing_browser_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698