blob: 907f58cc9fad9b87f0c2c651b6ec38775d5fc5a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// Copyright 2013 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 "chrome/browser/ui/webui/options/geolocation_options_handler.h"
#include "base/command_line.h"
#include "base/metrics/field_trial.h"
#include "chrome/common/chrome_switches.h"
#include "content/public/browser/web_ui.h"
namespace options {
GeolocationOptionsHandler::GeolocationOptionsHandler() {}
GeolocationOptionsHandler::~GeolocationOptionsHandler() {}
void GeolocationOptionsHandler::GetLocalizedValues(
base::DictionaryValue* localized_strings) {
}
void GeolocationOptionsHandler::InitializePage() {
DCHECK(web_ui());
const char kEnablePrefix[] = "Enable";
const char kFieldTrialName[] = "GoogleNow";
std::string enable_prefix(kEnablePrefix);
std::string field_trial_result =
base::FieldTrialList::FindFullName(kFieldTrialName);
if (field_trial_result.compare(
0,
enable_prefix.length(),
enable_prefix) == 0) {
web_ui()->CallJavascriptFunction(
"GeolocationOptions.showGeolocationOption");
}
}
} // namespace options
|