OLD | NEW |
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 "chrome/browser/ui/metro_pin_tab_helper_win.h" | 5 #include "chrome/browser/ui/metro_pin_tab_helper_win.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 const wchar_t kDefaultLogoFileName[] = L"SecondaryTile.png"; | 125 const wchar_t kDefaultLogoFileName[] = L"SecondaryTile.png"; |
126 *logo_path = logo_dir.Append(kDefaultLogoFileName); | 126 *logo_path = logo_dir.Append(kDefaultLogoFileName); |
127 if (file_util::PathExists(*logo_path)) | 127 if (file_util::PathExists(*logo_path)) |
128 return true; | 128 return true; |
129 | 129 |
130 base::FilePath default_logo_path; | 130 base::FilePath default_logo_path; |
131 if (!PathService::Get(base::DIR_MODULE, &default_logo_path)) | 131 if (!PathService::Get(base::DIR_MODULE, &default_logo_path)) |
132 return false; | 132 return false; |
133 | 133 |
134 default_logo_path = default_logo_path.Append(kDefaultLogoFileName); | 134 default_logo_path = default_logo_path.Append(kDefaultLogoFileName); |
135 return file_util::CopyFile(default_logo_path, *logo_path); | 135 return base::CopyFile(default_logo_path, *logo_path); |
136 } | 136 } |
137 | 137 |
138 // UMA reporting callback for site-specific secondary tile creation. | 138 // UMA reporting callback for site-specific secondary tile creation. |
139 void PinPageReportUmaCallback( | 139 void PinPageReportUmaCallback( |
140 base::win::MetroSecondaryTilePinUmaResult result) { | 140 base::win::MetroSecondaryTilePinUmaResult result) { |
141 UMA_HISTOGRAM_ENUMERATION(kMetroPinMetric, | 141 UMA_HISTOGRAM_ENUMERATION(kMetroPinMetric, |
142 result, | 142 result, |
143 base::win::METRO_PIN_STATE_LIMIT); | 143 base::win::METRO_PIN_STATE_LIMIT); |
144 } | 144 } |
145 | 145 |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 | 454 |
455 GURL url = web_contents()->GetURL(); | 455 GURL url = web_contents()->GetURL(); |
456 string16 tile_id = GenerateTileId(UTF8ToUTF16(url.spec())); | 456 string16 tile_id = GenerateTileId(UTF8ToUTF16(url.spec())); |
457 metro_un_pin_from_start_screen(tile_id, | 457 metro_un_pin_from_start_screen(tile_id, |
458 base::Bind(&PinPageReportUmaCallback)); | 458 base::Bind(&PinPageReportUmaCallback)); |
459 } | 459 } |
460 | 460 |
461 void MetroPinTabHelper::FaviconDownloaderFinished() { | 461 void MetroPinTabHelper::FaviconDownloaderFinished() { |
462 favicon_chooser_.reset(); | 462 favicon_chooser_.reset(); |
463 } | 463 } |
OLD | NEW |