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

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

Issue 11146028: Mark Chrome OS default apps as WAS_INSTALLED_BY_DEFAULT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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) 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/external_provider_impl.h" 5 #include "chrome/browser/extensions/external_provider_impl.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/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/linked_ptr.h" 10 #include "base/memory/linked_ptr.h"
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 #endif 326 #endif
327 327
328 bool is_chromeos_demo_session = false; 328 bool is_chromeos_demo_session = false;
329 int bundled_extension_creation_flags = Extension::NO_FLAGS; 329 int bundled_extension_creation_flags = Extension::NO_FLAGS;
330 #if defined(OS_CHROMEOS) 330 #if defined(OS_CHROMEOS)
331 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); 331 chromeos::UserManager* user_manager = chromeos::UserManager::Get();
332 is_chromeos_demo_session = 332 is_chromeos_demo_session =
333 user_manager && user_manager->IsLoggedInAsDemoUser() && 333 user_manager && user_manager->IsLoggedInAsDemoUser() &&
334 g_browser_process->browser_policy_connector()->GetDeviceMode() == 334 g_browser_process->browser_policy_connector()->GetDeviceMode() ==
335 policy::DEVICE_MODE_KIOSK; 335 policy::DEVICE_MODE_KIOSK;
336 bundled_extension_creation_flags = Extension::FROM_WEBSTORE; 336 bundled_extension_creation_flags = Extension::FROM_WEBSTORE |
337 Extension::WAS_INSTALLED_BY_DEFAULT;
337 #endif 338 #endif
338 339
339 if (!is_chromeos_demo_session) { 340 if (!is_chromeos_demo_session) {
340 provider_list->push_back( 341 provider_list->push_back(
341 linked_ptr<ExternalProviderInterface>( 342 linked_ptr<ExternalProviderInterface>(
342 new ExternalProviderImpl( 343 new ExternalProviderImpl(
343 service, 344 service,
344 new ExternalPrefLoader(chrome::DIR_EXTERNAL_EXTENSIONS, 345 new ExternalPrefLoader(chrome::DIR_EXTERNAL_EXTENSIONS,
345 check_admin_permissions_on_mac), 346 check_admin_permissions_on_mac),
346 Extension::EXTERNAL_PREF, 347 Extension::EXTERNAL_PREF,
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 service, 420 service,
420 connector->GetAppPackUpdater()->CreateExternalLoader(), 421 connector->GetAppPackUpdater()->CreateExternalLoader(),
421 Extension::EXTERNAL_PREF, 422 Extension::EXTERNAL_PREF,
422 Extension::INVALID, 423 Extension::INVALID,
423 Extension::NO_FLAGS))); 424 Extension::NO_FLAGS)));
424 } 425 }
425 #endif 426 #endif
426 } 427 }
427 428
428 } // namespace extensions 429 } // 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