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

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

Issue 10834191: new implementation of default apps (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: disable default_app unit_test for chromeos Created 8 years, 4 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) 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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 provider_list->push_back( 387 provider_list->push_back(
388 linked_ptr<ExternalProviderInterface>( 388 linked_ptr<ExternalProviderInterface>(
389 new ExternalProviderImpl( 389 new ExternalProviderImpl(
390 service, 390 service,
391 new ExternalPolicyLoader(profile), 391 new ExternalPolicyLoader(profile),
392 Extension::INVALID, 392 Extension::INVALID,
393 Extension::EXTERNAL_POLICY_DOWNLOAD, 393 Extension::EXTERNAL_POLICY_DOWNLOAD,
394 Extension::NO_FLAGS))); 394 Extension::NO_FLAGS)));
395 395
396 #if !defined(OS_CHROMEOS) 396 #if !defined(OS_CHROMEOS)
397 // The default apps are installed as INTERNAL but use the external
398 // extension installer codeflow.
397 provider_list->push_back( 399 provider_list->push_back(
398 linked_ptr<ExternalProviderInterface>( 400 linked_ptr<ExternalProviderInterface>(
399 new default_apps::Provider( 401 new default_apps::Provider(
400 profile, 402 profile,
401 service, 403 service,
402 new ExternalPrefLoader(chrome::DIR_DEFAULT_APPS, 404 new ExternalPrefLoader(chrome::DIR_DEFAULT_APPS,
403 ExternalPrefLoader::NONE), 405 ExternalPrefLoader::NONE),
404 Extension::EXTERNAL_PREF, 406 Extension::INTERNAL,
405 Extension::INVALID, 407 Extension::INVALID,
406 Extension::FROM_WEBSTORE))); 408 Extension::FROM_WEBSTORE)));
407 #endif 409 #endif
408 410
409 #if defined(OS_CHROMEOS) 411 #if defined(OS_CHROMEOS)
410 policy::BrowserPolicyConnector* connector = 412 policy::BrowserPolicyConnector* connector =
411 g_browser_process->browser_policy_connector(); 413 g_browser_process->browser_policy_connector();
412 if (is_chromeos_demo_session && connector->GetAppPackUpdater()) { 414 if (is_chromeos_demo_session && connector->GetAppPackUpdater()) {
413 provider_list->push_back( 415 provider_list->push_back(
414 linked_ptr<ExternalProviderInterface>( 416 linked_ptr<ExternalProviderInterface>(
415 new ExternalProviderImpl( 417 new ExternalProviderImpl(
416 service, 418 service,
417 connector->GetAppPackUpdater()->CreateExternalLoader(), 419 connector->GetAppPackUpdater()->CreateExternalLoader(),
418 Extension::EXTERNAL_PREF, 420 Extension::EXTERNAL_PREF,
419 Extension::INVALID, 421 Extension::INVALID,
420 Extension::NO_FLAGS))); 422 Extension::NO_FLAGS)));
421 } 423 }
422 #endif 424 #endif
423 } 425 }
424 426
425 } // namespace extensions 427 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698