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

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

Issue 779103002: Revert of Various changes required to support ChromeVox Next to read Views and Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 void ComponentLoader::AddChromeVoxExtension( 349 void ComponentLoader::AddChromeVoxExtension(
350 const base::Closure& done_cb) { 350 const base::Closure& done_cb) {
351 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 351 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
352 base::FilePath resources_path; 352 base::FilePath resources_path;
353 PathService::Get(chrome::DIR_RESOURCES, &resources_path); 353 PathService::Get(chrome::DIR_RESOURCES, &resources_path);
354 354
355 base::FilePath chromevox_path = 355 base::FilePath chromevox_path =
356 resources_path.Append(extension_misc::kChromeVoxExtensionPath); 356 resources_path.Append(extension_misc::kChromeVoxExtensionPath);
357 357
358 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 358 const CommandLine* command_line = CommandLine::ForCurrentProcess();
359 bool is_chromevox_next =
360 command_line->HasSwitch(chromeos::switches::kEnableChromeVoxNext);
359 bool is_guest = command_line->HasSwitch(chromeos::switches::kGuestSession); 361 bool is_guest = command_line->HasSwitch(chromeos::switches::kGuestSession);
360 const char* manifest_filename = 362 const char* manifest_filename;
361 is_guest ? extension_misc::kChromeVoxGuestManifestFilename 363 if (is_chromevox_next) {
362 : extension_misc::kChromeVoxManifestFilename; 364 manifest_filename =
363 365 is_guest ? extension_misc::kChromeVoxNextGuestManifestFilename
366 : extension_misc::kChromeVoxNextManifestFilename;
367 } else {
368 manifest_filename =
369 is_guest ? extension_misc::kChromeVoxGuestManifestFilename
370 : extension_misc::kChromeVoxManifestFilename;
371 }
364 BrowserThread::PostTaskAndReplyWithResult( 372 BrowserThread::PostTaskAndReplyWithResult(
365 BrowserThread::FILE, 373 BrowserThread::FILE,
366 FROM_HERE, 374 FROM_HERE,
367 base::Bind(&LoadManifestOnFileThread, chromevox_path, manifest_filename), 375 base::Bind(&LoadManifestOnFileThread, chromevox_path, manifest_filename),
368 base::Bind(&ComponentLoader::AddChromeVoxExtensionWithManifest, 376 base::Bind(&ComponentLoader::AddChromeVoxExtensionWithManifest,
369 weak_factory_.GetWeakPtr(), 377 weak_factory_.GetWeakPtr(),
370 chromevox_path, 378 chromevox_path,
371 done_cb)); 379 done_cb));
372 } 380 }
373 381
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 off_the_record_context, Extension::GetBaseURLFromExtensionId(id)); 658 off_the_record_context, Extension::GetBaseURLFromExtensionId(id));
651 storage::FileSystemContext* file_system_context = 659 storage::FileSystemContext* file_system_context =
652 content::BrowserContext::GetStoragePartitionForSite( 660 content::BrowserContext::GetStoragePartitionForSite(
653 off_the_record_context, site)->GetFileSystemContext(); 661 off_the_record_context, site)->GetFileSystemContext();
654 file_system_context->EnableTemporaryFileSystemInIncognito(); 662 file_system_context->EnableTemporaryFileSystemInIncognito();
655 } 663 }
656 #endif 664 #endif
657 } 665 }
658 666
659 } // namespace extensions 667 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/existing_user_controller.cc ('k') | chrome/browser/resources/chromeos/chromevox/chromevox.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698