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

Side by Side Diff: chrome/browser/ui/metro_pin_tab_helper_win.cc

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 "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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // |logo_dir|, it will be used, otherwise it will be copied out of the install 117 // |logo_dir|, it will be used, otherwise it will be copied out of the install
118 // folder. (The version in the install folder is not used as it may disappear 118 // folder. (The version in the install folder is not used as it may disappear
119 // after an upgrade, causing tiles to lose their images if Windows rebuilds 119 // after an upgrade, causing tiles to lose their images if Windows rebuilds
120 // its tile image cache.) 120 // its tile image cache.)
121 // The path to the logo is returned in |logo_path|, with the return value 121 // The path to the logo is returned in |logo_path|, with the return value
122 // indicating success. 122 // indicating success.
123 bool GetPathToBackupLogo(const base::FilePath& logo_dir, 123 bool GetPathToBackupLogo(const base::FilePath& logo_dir,
124 base::FilePath* logo_path) { 124 base::FilePath* logo_path) {
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 (base::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 base::CopyFile(default_logo_path, *logo_path); 135 return base::CopyFile(default_logo_path, *logo_path);
136 } 136 }
137 137
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/screenshot_taker_unittest.cc ('k') | chrome/browser/ui/prefs/prefs_tab_helper_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698