Commit 4aca105d authored by Michael Martis's avatar Michael Martis Committed by Commit Bot

Image annotation service: added prod server URL.

This change lets Chrome talk to the production image annotation server.

It also includes a bugfix: the experiment feature is changed from
constexpr to const, as suggested here:
https://cs.chromium.org/chromium/src/base/feature_list.h?l=33&rcl=9d2ac606c7193521bef66585a5209fa562d209c4

Bug: 916420
Change-Id: I5fe8f87d4b8b7b8101931476d19e1aecd0d0c8a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1504655
Commit-Queue: Michael Martis <martis@chromium.org>
Reviewed-by: default avatarJia Meng <jiameng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#637982}
parent 33aaccf7
......@@ -12,7 +12,9 @@
namespace image_annotation {
constexpr base::Feature ImageAnnotationService::kExperiment;
// static
const base::Feature ImageAnnotationService::kExperiment{
"ImageAnnotationServiceExperimental", base::FEATURE_DISABLED_BY_DEFAULT};
constexpr base::FeatureParam<std::string> ImageAnnotationService::kServerUrl;
constexpr base::FeatureParam<std::string> ImageAnnotationService::kApiKey;
constexpr base::FeatureParam<int> ImageAnnotationService::kThrottleMs;
......
......@@ -23,9 +23,8 @@ namespace image_annotation {
class ImageAnnotationService : public service_manager::Service {
public:
// Whether or not to enable service logic for experimentation.
static constexpr base::Feature kExperiment{
"ImageAnnotationServiceExperimental", base::FEATURE_DISABLED_BY_DEFAULT};
// Whether or not to override service parameters for experimentation.
static const base::Feature kExperiment;
ImageAnnotationService(
service_manager::mojom::ServiceRequest request,
......@@ -36,10 +35,9 @@ class ImageAnnotationService : public service_manager::Service {
private:
// Service params:
// The service will fail gracefully (i.e. return error codes) when this param
// is empty. This ensures graceful behavior when |kExperiment| is disabled.
static constexpr base::FeatureParam<std::string> kServerUrl{&kExperiment,
"server_url", ""};
static constexpr base::FeatureParam<std::string> kServerUrl{
&kExperiment, "server_url",
"https://ckintersect-pa.googleapis.com/v1/intersect/pixels"};
// An override Google API key. If empty, the API key with which the browser
// was built (if any) will be used instead.
static constexpr base::FeatureParam<std::string> kApiKey{&kExperiment,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment