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

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

Issue 410713002: Control easy unlock by a field trial. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/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/file_util.h" 10 #include "base/file_util.h"
11 #include "base/json/json_string_value_serializer.h" 11 #include "base/json/json_string_value_serializer.h"
12 #include "base/metrics/field_trial.h" 12 #include "base/metrics/field_trial.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "chrome/browser/extensions/extension_service.h" 14 #include "chrome/browser/extensions/extension_service.h"
15 #include "chrome/browser/signin/easy_unlock.h"
15 #include "chrome/common/chrome_paths.h" 16 #include "chrome/common/chrome_paths.h"
16 #include "chrome/common/chrome_switches.h" 17 #include "chrome/common/chrome_switches.h"
17 #include "chrome/common/chrome_version_info.h" 18 #include "chrome/common/chrome_version_info.h"
18 #include "chrome/common/extensions/extension_constants.h" 19 #include "chrome/common/extensions/extension_constants.h"
19 #include "content/public/browser/browser_thread.h" 20 #include "content/public/browser/browser_thread.h"
20 #include "content/public/browser/plugin_service.h" 21 #include "content/public/browser/plugin_service.h"
21 #include "extensions/common/extension.h" 22 #include "extensions/common/extension.h"
22 #include "extensions/common/file_util.h" 23 #include "extensions/common/file_util.h"
23 #include "extensions/common/id_util.h" 24 #include "extensions/common/id_util.h"
24 #include "extensions/common/manifest_constants.h" 25 #include "extensions/common/manifest_constants.h"
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 Add(IDR_GOOGLE_NOW_MANIFEST, 586 Add(IDR_GOOGLE_NOW_MANIFEST,
586 base::FilePath(FILE_PATH_LITERAL("google_now"))); 587 base::FilePath(FILE_PATH_LITERAL("google_now")));
587 } 588 }
588 #endif 589 #endif
589 590
590 #if defined(GOOGLE_CHROME_BUILD) 591 #if defined(GOOGLE_CHROME_BUILD)
591 #if !defined(OS_CHROMEOS) // http://crbug.com/314799 592 #if !defined(OS_CHROMEOS) // http://crbug.com/314799
592 AddNetworkSpeechSynthesisExtension(); 593 AddNetworkSpeechSynthesisExtension();
593 #endif 594 #endif
594 595
595 if (!skip_session_components && 596 if (!skip_session_components && easy_unlock::IsEnabled()) {
596 command_line->HasSwitch(switches::kEnableEasyUnlock)) {
597 if (command_line->HasSwitch(switches::kEasyUnlockAppPath)) { 597 if (command_line->HasSwitch(switches::kEasyUnlockAppPath)) {
598 base::FilePath easy_unlock_path( 598 base::FilePath easy_unlock_path(
599 command_line->GetSwitchValuePath(switches::kEasyUnlockAppPath)); 599 command_line->GetSwitchValuePath(switches::kEasyUnlockAppPath));
Alexei Svitkine (slow) 2014/07/22 18:18:40 Hmm, what happens if its enabled via field trial b
Tim Song 2014/07/22 18:36:09 No component app will be installed in this case.
xiyuan 2014/07/22 20:00:23 The non-cros release plan is still unclear ATM. Cr
600 Add(IDR_EASY_UNLOCK_MANIFEST, easy_unlock_path); 600 Add(IDR_EASY_UNLOCK_MANIFEST, easy_unlock_path);
601 } else { 601 } else {
602 #if defined(OS_CHROMEOS) 602 #if defined(OS_CHROMEOS)
603 Add(IDR_EASY_UNLOCK_MANIFEST, 603 Add(IDR_EASY_UNLOCK_MANIFEST,
604 base::FilePath( 604 base::FilePath(
605 FILE_PATH_LITERAL("/usr/share/chromeos-assets/easy_unlock"))); 605 FILE_PATH_LITERAL("/usr/share/chromeos-assets/easy_unlock")));
606 #endif 606 #endif
607 } 607 }
608 } 608 }
609 #endif // defined(GOOGLE_CHROME_BUILD) 609 #endif // defined(GOOGLE_CHROME_BUILD)
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 off_the_record_context, Extension::GetBaseURLFromExtensionId(id)); 646 off_the_record_context, Extension::GetBaseURLFromExtensionId(id));
647 fileapi::FileSystemContext* file_system_context = 647 fileapi::FileSystemContext* file_system_context =
648 content::BrowserContext::GetStoragePartitionForSite( 648 content::BrowserContext::GetStoragePartitionForSite(
649 off_the_record_context, site)->GetFileSystemContext(); 649 off_the_record_context, site)->GetFileSystemContext();
650 file_system_context->EnableTemporaryFileSystemInIncognito(); 650 file_system_context->EnableTemporaryFileSystemInIncognito();
651 } 651 }
652 #endif 652 #endif
653 } 653 }
654 654
655 } // namespace extensions 655 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/signin/easy_unlock.h » ('j') | chrome/browser/signin/easy_unlock.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698