forked from sanyaade-mobiledev/chromium.src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the basic infrastructure for the Behavior feature type: BehaviorF…
…eature and _behavior_features.json. Arbitrarily use it to implement the allow-in-incognito whitelist. BUG=440194 R=rockot@chromium.org Review URL: https://codereview.chromium.org/789383002 Cr-Commit-Position: refs/heads/master@{#308311}
- Loading branch information
kalman
authored and
Commit bot
committed
Dec 15, 2014
1 parent
60e5f11
commit 6421032
Showing
16 changed files
with
130 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright 2014 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// This features file defines switches used to control Extension behaviour, | ||
// typically whitelist configuration. | ||
// | ||
// See extensions/common/features/* to understand this file, in particular | ||
// feature.h, simple_feature.h, and base_feature_provider.h. | ||
// | ||
// To add a new whitelisted ID, SHA-1 it and force it to uppercase. In Bash: | ||
// | ||
// $ echo -n "aaaabbbbccccddddeeeeffffgggghhhh" | \ | ||
// sha1sum | tr '[:lower:]' '[:upper:]' | ||
// 9A0417016F345C934A1A88F55CA17C05014EEEBA - | ||
// | ||
// Google employees: please update http://go/chrome-api-whitelist to map | ||
// hashes back to ids. | ||
|
||
{ | ||
"whitelisted_for_incognito": { | ||
"channel": "stable", | ||
"extension_types": "all", | ||
// This is "external_component" for legacy reasons; it should be | ||
// unnecessary given there's a whitelist. | ||
"location": "external_component", | ||
"whitelist": [ | ||
"D5736E4B5CF695CB93A2FB57E4FDC6E5AFAB6FE2", // http://crbug.com/312900 | ||
"D57DE394F36DC1C3220E7604C575D29C51A6C495", // http://crbug.com/319444 | ||
"3F65507A3B39259B38C8173C6FFA3D12DF64CCE9" // http://crbug.com/371562 | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright 2014 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "extensions/common/features/behavior_feature.h" | ||
|
||
namespace extensions { | ||
|
||
const char* BehaviorFeature::kWhitelistedForIncognito = | ||
"whitelisted_for_incognito"; | ||
|
||
} // namespace extensions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright 2014 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef EXTENSIONS_COMMON_FEATURES_BEHAVIOR_FEATURE_H_ | ||
#define EXTENSIONS_COMMON_FEATURES_BEHAVIOR_FEATURE_H_ | ||
|
||
#include <string> | ||
|
||
#include "extensions/common/features/simple_feature.h" | ||
|
||
namespace extensions { | ||
|
||
// Implementation of the features in _behavior_features.json. | ||
// | ||
// For now, this is just constants + a vacuous implementation of SimpleFeature, | ||
// for consistency with the other Feature types. One day we may add some | ||
// additional functionality. One day we may also generate the feature names. | ||
class BehaviorFeature : public SimpleFeature { | ||
public: | ||
// Constants corresponding to keys in _behavior_features.json. | ||
static const char* kWhitelistedForIncognito; | ||
}; | ||
|
||
} // namespace extensions | ||
|
||
#endif // EXTENSIONS_COMMON_FEATURES_BEHAVIOR_FEATURE_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters