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

Side by Side Diff: content/browser/geolocation/win7_location_api_win.cc

Issue 12213066: Use base namespace for FilePath in content/browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months 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 | Annotate | Revision Log
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 "content/browser/geolocation/win7_location_api_win.h" 5 #include "content/browser/geolocation/win7_location_api_win.h"
6 6
7 #include "base/base_paths_win.h" 7 #include "base/base_paths_win.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/path_service.h" 12 #include "base/path_service.h"
13 #include "base/win/scoped_propvariant.h" 13 #include "base/win/scoped_propvariant.h"
14 #include "content/public/common/content_switches.h" 14 #include "content/public/common/content_switches.h"
15 #include "content/public/common/geoposition.h" 15 #include "content/public/common/geoposition.h"
16 16
17 namespace content { 17 namespace content {
18 namespace { 18 namespace {
19 const double kKnotsToMetresPerSecondConversionFactor = 0.5144; 19 const double kKnotsToMetresPerSecondConversionFactor = 0.5144;
20 20
21 void ConvertKnotsToMetresPerSecond(double* knots) { 21 void ConvertKnotsToMetresPerSecond(double* knots) {
22 *knots *= kKnotsToMetresPerSecondConversionFactor; 22 *knots *= kKnotsToMetresPerSecondConversionFactor;
23 } 23 }
24 24
25 HINSTANCE LoadWin7Library(const string16& lib_name) { 25 HINSTANCE LoadWin7Library(const string16& lib_name) {
26 FilePath sys_dir; 26 base::FilePath sys_dir;
27 PathService::Get(base::DIR_SYSTEM, &sys_dir); 27 PathService::Get(base::DIR_SYSTEM, &sys_dir);
28 return LoadLibrary(sys_dir.Append(lib_name).value().c_str()); 28 return LoadLibrary(sys_dir.Append(lib_name).value().c_str());
29 } 29 }
30 } 30 }
31 31
32 Win7LocationApi::Win7LocationApi() 32 Win7LocationApi::Win7LocationApi()
33 : prop_lib_(0), 33 : prop_lib_(0),
34 PropVariantToDouble_function_(0), 34 PropVariantToDouble_function_(0),
35 locator_(0) { 35 locator_(0) {
36 } 36 }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 bool Win7LocationApi::SetHighAccuracy(bool acc) { 161 bool Win7LocationApi::SetHighAccuracy(bool acc) {
162 HRESULT result_type; 162 HRESULT result_type;
163 result_type = locator_->SetDesiredAccuracy(IID_ILatLongReport, 163 result_type = locator_->SetDesiredAccuracy(IID_ILatLongReport,
164 acc ? LOCATION_DESIRED_ACCURACY_HIGH : 164 acc ? LOCATION_DESIRED_ACCURACY_HIGH :
165 LOCATION_DESIRED_ACCURACY_DEFAULT); 165 LOCATION_DESIRED_ACCURACY_DEFAULT);
166 return SUCCEEDED(result_type); 166 return SUCCEEDED(result_type);
167 } 167 }
168 168
169 } // namespace content 169 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gamepad/gamepad_platform_data_fetcher_win.cc ('k') | content/browser/gpu/gpu_blacklist_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698