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

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

Issue 635573005: Cleanup: Better constify some strings in chrome/browser/{chromeos,extensions}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, nit Created 6 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/extension_util.h" 5 #include "chrome/browser/extensions/extension_util.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 26 matching lines...) Expand all
37 namespace { 37 namespace {
38 38
39 // The entry into the ExtensionPrefs for allowing an extension to script on 39 // The entry into the ExtensionPrefs for allowing an extension to script on
40 // all urls without explicit permission. 40 // all urls without explicit permission.
41 const char kExtensionAllowedOnAllUrlsPrefName[] = 41 const char kExtensionAllowedOnAllUrlsPrefName[] =
42 "extension_can_script_all_urls"; 42 "extension_can_script_all_urls";
43 43
44 // Returns true if |extension_id| for an external component extension should 44 // Returns true if |extension_id| for an external component extension should
45 // always be enabled in incognito windows. 45 // always be enabled in incognito windows.
46 bool IsWhitelistedForIncognito(const std::string& extension_id) { 46 bool IsWhitelistedForIncognito(const std::string& extension_id) {
47 static const char* kExtensionWhitelist[] = { 47 static const char* const kExtensionWhitelist[] = {
48 "D5736E4B5CF695CB93A2FB57E4FDC6E5AFAB6FE2", // http://crbug.com/312900 48 "D5736E4B5CF695CB93A2FB57E4FDC6E5AFAB6FE2", // http://crbug.com/312900
49 "D57DE394F36DC1C3220E7604C575D29C51A6C495", // http://crbug.com/319444 49 "D57DE394F36DC1C3220E7604C575D29C51A6C495", // http://crbug.com/319444
50 "3F65507A3B39259B38C8173C6FFA3D12DF64CCE9" // http://crbug.com/371562 50 "3F65507A3B39259B38C8173C6FFA3D12DF64CCE9" // http://crbug.com/371562
51 }; 51 };
52 52
53 return extensions::SimpleFeature::IsIdInList( 53 return extensions::SimpleFeature::IsIdInList(
54 extension_id, 54 extension_id,
55 std::set<std::string>( 55 std::set<std::string>(
56 kExtensionWhitelist, 56 kExtensionWhitelist,
57 kExtensionWhitelist + arraysize(kExtensionWhitelist))); 57 kExtensionWhitelist + arraysize(kExtensionWhitelist)));
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 IDR_EXTENSION_DEFAULT_ICON); 359 IDR_EXTENSION_DEFAULT_ICON);
360 } 360 }
361 361
362 bool IsStreamlinedHostedAppsEnabled() { 362 bool IsStreamlinedHostedAppsEnabled() {
363 return CommandLine::ForCurrentProcess()->HasSwitch( 363 return CommandLine::ForCurrentProcess()->HasSwitch(
364 switches::kEnableStreamlinedHostedApps); 364 switches::kEnableStreamlinedHostedApps);
365 } 365 }
366 366
367 } // namespace util 367 } // namespace util
368 } // namespace extensions 368 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698