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

Side by Side Diff: chrome/browser/extensions/component_loader.cc

Issue 874483005: Fix ComponentLoader unit tests on cros_trunk (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 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
« 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) 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/browser/extensions/component_loader.h" 5 #include "chrome/browser/extensions/component_loader.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 CHECK(manifest) << error; 84 CHECK(manifest) << error;
85 bool localized = extension_l10n_util::LocalizeExtension( 85 bool localized = extension_l10n_util::LocalizeExtension(
86 chromevox_path, manifest.get(), &error); 86 chromevox_path, manifest.get(), &error);
87 CHECK(localized) << error; 87 CHECK(localized) << error;
88 return manifest.Pass(); 88 return manifest.Pass();
89 } 89 }
90 90
91 bool IsNormalSession() { 91 bool IsNormalSession() {
92 return !base::CommandLine::ForCurrentProcess()->HasSwitch( 92 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
93 chromeos::switches::kGuestSession) && 93 chromeos::switches::kGuestSession) &&
94 user_manager::UserManager::IsInitialized() &&
94 user_manager::UserManager::Get()->IsUserLoggedIn(); 95 user_manager::UserManager::Get()->IsUserLoggedIn();
95 } 96 }
96 #endif // defined(OS_CHROMEOS) 97 #endif // defined(OS_CHROMEOS)
97 98
98 } // namespace 99 } // namespace
99 100
100 ComponentLoader::ComponentExtensionInfo::ComponentExtensionInfo( 101 ComponentLoader::ComponentExtensionInfo::ComponentExtensionInfo(
101 const base::DictionaryValue* manifest, const base::FilePath& directory) 102 const base::DictionaryValue* manifest, const base::FilePath& directory)
102 : manifest(manifest), 103 : manifest(manifest),
103 root_directory(directory) { 104 root_directory(directory) {
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 off_the_record_context, Extension::GetBaseURLFromExtensionId(id)); 660 off_the_record_context, Extension::GetBaseURLFromExtensionId(id));
660 storage::FileSystemContext* file_system_context = 661 storage::FileSystemContext* file_system_context =
661 content::BrowserContext::GetStoragePartitionForSite( 662 content::BrowserContext::GetStoragePartitionForSite(
662 off_the_record_context, site)->GetFileSystemContext(); 663 off_the_record_context, site)->GetFileSystemContext();
663 file_system_context->EnableTemporaryFileSystemInIncognito(); 664 file_system_context->EnableTemporaryFileSystemInIncognito();
664 } 665 }
665 #endif 666 #endif
666 } 667 }
667 668
668 } // namespace extensions 669 } // namespace extensions
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